org_aspectj_weaver_WeaverModuleTests_java
org.aspectj.weaver.reflect.Java15AnnotationFinder
public ResolvedType[] getAnnotations(Member onMember, boolean areRuntimeAnnotationsSufficient) { if (!(onMember instanceof AccessibleObject)) { return ResolvedType.NONE; } // If annotations with class level retention are required then we need to open // open the class file. If only runtime retention annotations are required // we can just use reflection. if (!areRuntimeAnnotationsSufficient) { try { JavaClass jc = getBcelRepository().loadClass(onMember.getDeclaringClass()); org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns = null; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method) onMember); if (bcelMethod != null) { anns = bcelMethod.getAnnotations(); } } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor<?>) onMember); anns = bcelCons.getAnnotations(); } else if (onMember instanceof Field) { org.aspectj.apache.bcel.classfile.Field bcelField = jc.getField((Field) onMember); anns = bcelField.getAnnotations(); } // the answer is cached and we don't want to hold on to memory getBcelRepository().clear(); if (anns == null || anns.length == 0) { return ResolvedType.NONE; } ResolvedType[] annotationTypes = new ResolvedType[anns.length]; for (int i = 0; i < anns.length; i++) { annotationTypes[i] = world.resolve(UnresolvedType.forSignature(anns[i].getTypeSignature())); } return annotationTypes;

 -> java.lang.reflect.Member.getDeclaringClass(): java.lang.Class -> java.lang.reflect.Method.getParameterTypes(): java.lang.Class[] -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.reflect.Method.getReturnType(): java.lang.Class -> java.lang.Class.isArray(): boolean -> java.lang.Class.isPrimitive(): boolean -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.toString(): java.lang.String -> java.lang.String.startsWith(java.lang.String): boolean -> java.lang.String.contains(java.lang.CharSequence): boolean -> java.lang.String.charAt(int): char -> java.lang.String.charAt(int): char -> java.lang.String.length(): int -> java.lang.String.indexOf(int): int -> java.util.Map.get(java.lang.Object): java.lang.Object -> java.util.Map.get(java.lang.Object): java.lang.Object -> java.lang.ref.WeakReference.get(): java.lang.Object