Class AnnotationVisitor
🏭 Constructors
constructor
new AnnotationVisitor(api: number, av: null | AnnotationVisitor= null): AnnotationVisitorConstructs a new AnnotationVisitor.
Parameters
- api:
numberthe ASM API version implemented by this visitor. Must be one of ASM4 or ASM5. - av:
null | AnnotationVisitorthe 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: numberThe 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 | AnnotationVisitorThe 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): voidVisits a primitive value of the annotation.
Parameters
- name:
stringthe value name. - value:
anythe 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 | AnnotationVisitorVisits a nested annotation value of the annotation.
Parameters
- name:
stringthe value name. - desc:
stringthe class descriptor of the nested annotation class.
Return Type
null | AnnotationVisitor
Defined in: packages/asm/libs/AnnotationVisitor.ts:124
visitArray
visitArray(name: string): null | AnnotationVisitorVisits 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:
stringthe value name.
Return Type
null | AnnotationVisitor
Defined in: packages/asm/libs/AnnotationVisitor.ts:145
visitEnd
visitEnd(): voidVisits 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): voidVisits an enumeration value of the annotation.
Parameters
- name:
stringthe value name. - desc:
null | stringthe class descriptor of the enumeration class. - value:
null | stringthe actual enumeration value.
Return Type
void
Defined in: packages/asm/libs/AnnotationVisitor.ts:105