@Override public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation( final int parameter, final String desc, final boolean visible) { String annotationType = SignatureHelper.getType(desc); if (JAVA_LANG_SYNTHETIC.equals(annotationType)) { // Ignore synthetic parameters add the start of the signature, i.e. // determine the number of synthetic parameters syntheticParameters = Math.max(syntheticParameters, parameter + 1); return null; } ParameterDescriptor parameterDescriptor = visitorHelper.getParameterDescriptor(methodDescriptor, parameter - syntheticParameters); if (parameterDescriptor == null) { LOGGER.warn( "Cannot find parameter with index " + (parameter - syntheticParameters) + " in method signature " + containingType.getTypeDescriptor().getFullQualifiedName() + "#" + methodDescriptor.getSignature()); return null; } AnnotationValueDescriptor annotationDescriptor = visitorHelper.addAnnotation( containingType, parameterDescriptor, SignatureHelper.getType(desc)); return new AnnotationVisitor(containingType, annotationDescriptor, visitorHelper); }
@Override public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) { AnnotationValueDescriptor annotationDescriptor = visitorHelper.addAnnotation( containingType, methodDescriptor, SignatureHelper.getType(desc)); return new AnnotationVisitor(containingType, annotationDescriptor, visitorHelper); }
@Override public void visitMultiANewArrayInsn(final String desc, final int dims) { visitorHelper.resolveType(SignatureHelper.getType(desc), containingType); }
@Override public void visitLdcInsn(final Object cst) { if (cst instanceof Type) { visitorHelper.resolveType(SignatureHelper.getType((Type) cst), containingType); } }