Class AnnotationAppender.Target.OnMethodParameter

    • Field Detail

      • methodVisitor

        private final org.objectweb.asm.MethodVisitor methodVisitor
        The method visitor to write the annotation to.
      • parameterIndex

        private final int parameterIndex
        The method parameter index to write the annotation to.
    • Constructor Detail

      • OnMethodParameter

        public OnMethodParameter​(org.objectweb.asm.MethodVisitor methodVisitor,
                                 int parameterIndex)
        Creates a new wrapper for a Java method or constructor.
        Parameters:
        methodVisitor - The ASM method visitor to which the annotations are appended to.
        parameterIndex - The index of the method parameter.
    • Method Detail

      • visit

        public org.objectweb.asm.AnnotationVisitor visit​(java.lang.String annotationTypeDescriptor,
                                                         boolean visible)
        Creates an annotation visitor for writing the specified annotation.
        Specified by:
        visit in interface AnnotationAppender.Target
        Parameters:
        annotationTypeDescriptor - The type descriptor for the annotation to be written.
        visible - true if the annotation is to be visible at runtime.
        Returns:
        An annotation visitor for consuming the specified annotation.
      • visit

        public org.objectweb.asm.AnnotationVisitor visit​(java.lang.String annotationTypeDescriptor,
                                                         boolean visible,
                                                         int typeReference,
                                                         java.lang.String typePath)
        Creates an annotation visitor for writing the specified type annotation.
        Specified by:
        visit in interface AnnotationAppender.Target
        Parameters:
        annotationTypeDescriptor - The type descriptor for the annotation to be written.
        visible - true if the annotation is to be visible at runtime.
        typeReference - The type annotation's type reference.
        typePath - The type annotation's type path.
        Returns:
        An annotation visitor for consuming the specified annotation.