public static AnnotationNode getAnnotation(ClassNode m,Class<? extends Annotation> annotationType) { AnnotationNode a = getAnnotation(m.visibleAnnotations, annotationType); if(null == a){ a = getAnnotation(m.invisibleAnnotations, annotationType); } return a; }
AnnotationNode a = ASM.getAnnotation(cn, Monitored.class); if(null != a) { isMonitorDeclared = true;
public static AnnotationNode getAnnotation(MethodNode m,Class<? extends Annotation> annotationType) { AnnotationNode a = getAnnotation(m.visibleAnnotations, annotationType); if(null == a){ a = getAnnotation(m.invisibleAnnotations, annotationType); } return a; }
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodNode mn = ASM.getMethod(cn, name, desc); AnnotationNode a = ASM.getAnnotation(mn, Transactional.class); if(null != a) { log.trace(" #transactional method : {}", name); MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); return new TxMethodVisitor(a, mv , access, name, desc); } return super.visitMethod(access, name, desc, signature, exceptions); }