AnnoData(Annotation annotation) { annoClass = annotation.annotationType(); data = evaluate(annotation); }
private static Map<String, Object> evaluate(Annotation anno) { Map<String, Object> properties = new HashMap<>(); Class<? extends Annotation> annoClass = anno.annotationType(); Method[] ma = annoClass.getMethods(); for (Method m : ma) { if (isStandardAnnotationMethod(m) || shouldIgnore(m)) { continue; } properties.put(m.getName(), $.invokeVirtual(anno, m)); } return properties; }
injectTags.add(new AnnoData(anno)); continue; injectTags.add(new AnnoData(anno)); qualifiers.add(anno); annotations.put(anno.annotationType(), anno); annoData.add(new AnnoData(anno)); } else if (Filter.class == cls || cls.isAnnotationPresent(Filter.class)) { if (isContainer) { annoData.add(new AnnoData(valueLoader)); } else { for (Annotation anno : loadValueIncompatibles) { annotations.put(anno.annotationType(), anno); annoData.add(new AnnoData(anno)); this.mapKey = mapKey; annotations.put(mapKey.annotationType(), mapKey); annoData.add(new AnnoData(mapKey)); } else { Genie.logger.warn("MapKey annotation ignored on target without ElementLoader annotation presented");
injectTags.add(new AnnoData(anno)); continue; injectTags.add(new AnnoData(anno)); qualifiers.add(anno); annotations.put(anno.annotationType(), anno); annoData.add(new AnnoData(anno)); } else if (Filter.class == cls || cls.isAnnotationPresent(Filter.class)) { if (isContainer) { annoData.add(new AnnoData(valueLoader)); } else { for (Annotation anno : loadValueIncompatibles) { annotations.put(anno.annotationType(), anno); annoData.add(new AnnoData(anno)); this.mapKey = mapKey; annotations.put(mapKey.annotationType(), mapKey); annoData.add(new AnnoData(mapKey)); } else { Genie.logger.warn("MapKey annotation ignored on target without ElementLoader annotation presented");
AnnoData(Annotation annotation) { annoClass = annotation.annotationType(); data = evaluate(annotation); }
private static boolean shouldIgnore(Method method) { Annotation[] aa = method.getDeclaredAnnotations(); for (Annotation a : aa) { if (shouldIgnore(a)) { return true; } } return false; }
private static boolean shouldIgnore(Method method) { Annotation[] aa = method.getDeclaredAnnotations(); for (Annotation a : aa) { if (shouldIgnore(a)) { return true; } } return false; }
private static Map<String, Object> evaluate(Annotation anno) { Map<String, Object> properties = new HashMap<>(); Class<? extends Annotation> annoClass = anno.annotationType(); Method[] ma = annoClass.getMethods(); for (Method m : ma) { if (isStandardAnnotationMethod(m) || shouldIgnore(m)) { continue; } properties.put(m.getName(), $.invokeVirtual(anno, m)); } return properties; }