Class AnnotationVisitor
🏭 Constructors
constructor
new AnnotationVisitor(api: number, av: null | AnnotationVisitor= null): AnnotationVisitor
Constructs a new AnnotationVisitor.
Parameters
- api:
number
the ASM API version implemented by this visitor. Must be one of ASM4 or ASM5. - av:
null | AnnotationVisitor
the annotation visitor to which this visitor must delegate method calls. May be null.
Return Type
AnnotationVisitor
Defined in: packages/asm/libs/AnnotationVisitor.ts:65
🏷️ Properties
api
api: number
The ASM API version implemented by this visitor. The value of this field must be one of ASM4 or ASM5.
Defined in: packages/asm/libs/AnnotationVisitor.ts:47
av
av: null | AnnotationVisitor
The annotation visitor to which this visitor must delegate method calls. May be null.
Defined in: packages/asm/libs/AnnotationVisitor.ts:53
🔧 Methods
visit
visit(name: string, value: any): void
Visits a primitive value of the annotation.
Parameters
- name:
string
the value name. - value:
any
the actual value, whose type must be [Byte], [Boolean], [Character], [Short], [Integer] , [Long], [Float], [Double], [String] or Type of OBJECT or ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using #visitArray visitArray and visiting each array element in turn, but is more convenient).
Return Type
void
Defined in: packages/asm/libs/AnnotationVisitor.ts:89
visitAnnotation
visitAnnotation(name: string, desc: string): null | AnnotationVisitor
Visits a nested annotation value of the annotation.
Parameters
- name:
string
the value name. - desc:
string
the class descriptor of the nested annotation class.
Return Type
null | AnnotationVisitor
Defined in: packages/asm/libs/AnnotationVisitor.ts:124
visitArray
visitArray(name: string): null | AnnotationVisitor
Visits an array value of the annotation. Note that arrays of primitive types (such as byte, boolean, short, char, int, long, float or double) can be passed as value to #visit visit. This is what ClassReader does.
Parameters
- name:
string
the value name.
Return Type
null | AnnotationVisitor
Defined in: packages/asm/libs/AnnotationVisitor.ts:145
visitEnd
visitEnd(): void
Visits the end of the annotation.
Return Type
void
Defined in: packages/asm/libs/AnnotationVisitor.ts:155
visitEnum
visitEnum(name: string, desc: null | string, value: null | string): void
Visits an enumeration value of the annotation.
Parameters
- name:
string
the value name. - desc:
null | string
the class descriptor of the enumeration class. - value:
null | string
the actual enumeration value.
Return Type
void
Defined in: packages/asm/libs/AnnotationVisitor.ts:105