Пример #1
0
 @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);
 }
Пример #2
0
 @Override
 public void visitEnd() {
   methodDescriptor.setCyclomaticComplexity(cyclomaticComplexity);
 }