@SuppressWarnings("unchecked") private SetMultimap<MetaClass, Annotation> getValidationConfig(Collection<MetaClass> validationAnnotations, GeneratorContext context) { final SetMultimap<MetaClass, Annotation> beans = HashMultimap.create(); for (final MetaClass annotation : validationAnnotations) { for (final MetaField field : ClassScanner.getFieldsAnnotatedWith((Class<? extends Annotation>) annotation.asClass(), null, context)) { beans.put(field.getDeclaringClass(), field.getAnnotation((Class<? extends Annotation>) annotation.asClass())); } for (final MetaMethod method : ClassScanner.getMethodsAnnotatedWith((Class<? extends Annotation>) annotation.asClass(), null, context)) { beans.put(method.getDeclaringClass(), method.getAnnotation((Class<? extends Annotation>) annotation.asClass())); } for (final MetaClass type : ClassScanner.getTypesAnnotatedWith((Class<? extends Annotation>) annotation.asClass(), null, context)) { beans.put(type, type.getAnnotation((Class<? extends Annotation>) annotation.asClass())); } } return beans; }
final TranslationKey annotation = metaField.getAnnotation(TranslationKey.class); final String defaultValue = annotation.defaultValue(); if (defaultValue != null) {
final TranslationKey annotation = metaField.getAnnotation(TranslationKey.class); final String defaultValue = annotation.defaultValue(); if (defaultValue != null) {
PageState psAnno = field.getAnnotation(PageState.class); String fieldName = field.getName(); String queryParamName = psAnno.value();
PageState psAnno = field.getAnnotation(PageState.class); String fieldName = field.getName(); String queryParamName = psAnno.value();