for (AnnotationInfo annotation : info.getAnnotations()) { List<Info> annotationInfos = initAnnotationInfos(annotation.getName()); annotationInfos.add(info);
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && !info.getName().equals("<init>")) { final MethodInfo methodInfo = (MethodInfo) info;
for (AnnotationInfo annotation : info.getAnnotations()) { List<Info> annotationInfos = initAnnotationInfos(annotation.getName()); annotationInfos.add(info);
List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && info.getName().equals("<init>")) { MethodInfo methodInfo = (MethodInfo) info;
List<Info> infoList = annotated.get(metaroot.getName()); for (Info info : infoList) { final String className = info.getName() + "$$"; final ClassInfo i = parent.classInfos.get(className); if (i == null) continue;
List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && !info.getName().equals("<init>")) { final MethodInfo methodInfo = (MethodInfo) info;
List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && info.getName().equals("<init>")) { MethodInfo methodInfo = (MethodInfo) info;
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
List<Info> infoList = annotated.get(metaroot.getName()); for (Info info : infoList) { final String className = info.getName() + "$$"; final ClassInfo i = parent.classInfos.get(className); if (i == null) continue;
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
String meta = info.getMetaAnnotationName(); if (meta != null) { if (meta.equals(annotation.getName())) continue;
List<Info> infoList = annotated.get(metaroot.getName()); for (Info info : infoList) { final String className = info.getName() + "$$"; final ClassInfo i = parent.classInfos.get(className); if (i == null) continue;
for (AnnotationInfo annotation : info.getAnnotations()) { List<Info> annotationInfos = initAnnotationInfos(annotation.getName()); annotationInfos.add(info);
private Set<Class<?>> findMetaAnnotatedClasses(Class<? extends Annotation> annotation, Set<Class<?>> classes) { List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof ClassInfo) { ClassInfo classInfo = (ClassInfo) info; try { Class clazz = classInfo.get(); if (classes.contains(clazz)) continue; // double check via proper reflection if (clazz.isAnnotationPresent(annotation)) { classes.add(clazz); } String meta = info.getMetaAnnotationName(); if (meta != null) { classes.addAll(findMetaAnnotatedClasses((Class<? extends Annotation>) clazz, classes)); } } catch (ClassNotFoundException e) { classesNotLoaded.add(classInfo.getName()); } } } return classes; }
public List<Constructor> findAnnotatedConstructors(Class<? extends Annotation> annotation) { classesNotLoaded.clear(); List<ClassInfo> seen = new ArrayList<ClassInfo>(); List<Constructor> constructors = new ArrayList<Constructor>(); List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && info.getName().equals("<init>")) { MethodInfo methodInfo = (MethodInfo) info; ClassInfo classInfo = methodInfo.getDeclaringClass(); if (seen.contains(classInfo)) continue; seen.add(classInfo); try { Class clazz = classInfo.get(); for (Constructor constructor : clazz.getConstructors()) { if (constructor.isAnnotationPresent(annotation)) { constructors.add(constructor); } } } catch (ClassNotFoundException e) { classesNotLoaded.add(classInfo.getName()); } } } return constructors; }
public List<Method> findAnnotatedMethods(Class<? extends Annotation> annotation) { classesNotLoaded.clear(); List<ClassInfo> seen = new ArrayList<ClassInfo>(); List<Method> methods = new ArrayList<Method>(); List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof MethodInfo && !info.getName().equals("<init>")) { MethodInfo methodInfo = (MethodInfo) info; ClassInfo classInfo = methodInfo.getDeclaringClass(); if (seen.contains(classInfo)) continue; seen.add(classInfo); try { Class clazz = classInfo.get(); for (Method method : clazz.getDeclaredMethods()) { if (method.isAnnotationPresent(annotation)) { methods.add(method); } } } catch (ClassNotFoundException e) { classesNotLoaded.add(classInfo.getName()); } } } return methods; }
private Set<Class<?>> findMetaAnnotatedClasses(Class<? extends Annotation> annotation, Set<Class<?>> classes) { List<Info> infos = getAnnotationInfos(annotation.getName()); for (Info info : infos) { if (info instanceof ClassInfo) { ClassInfo classInfo = (ClassInfo) info; try { Class clazz = classInfo.get(); if (classes.contains(clazz)) continue; // double check via proper reflection if (clazz.isAnnotationPresent(annotation)) { classes.add(clazz); } String meta = info.getMetaAnnotationName(); if (meta != null) { classes.addAll(findMetaAnnotatedClasses((Class<? extends Annotation>) clazz, classes)); } } catch (ClassNotFoundException e) { classesNotLoaded.add(classInfo.getName()); } } } return classes; }