Skip to content

Class FieldVisitor

🏭 Constructors

constructor

ts
new FieldVisitor(api: number, fv: null | FieldVisitor= null): FieldVisitor

Constructs a new FieldVisitor.

Parameters

  • api: number the ASM API version implemented by this visitor. Must be one of ASM4 or ASM5.
  • fv: null | FieldVisitor the field visitor to which this visitor must delegate method calls. May be null.

Return Type

  • FieldVisitor

Defined in: packages/asm/libs/FieldVisitor.ts:66

🏷️ Properties

api

ts
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/FieldVisitor.ts:48

fv

ts
fv: null | FieldVisitor

The field visitor to which this visitor must delegate method calls. May be null.

Defined in: packages/asm/libs/FieldVisitor.ts:54

🔧 Methods

visitAnnotation

ts
visitAnnotation(desc: null | string, visible: boolean): null | AnnotationVisitor

Visits an annotation of the field.

Parameters

  • desc: null | string the class descriptor of the annotation class.
  • visible: boolean <tt>true</tt> if the annotation is visible at runtime.

Return Type

  • null | AnnotationVisitor

Defined in: packages/asm/libs/FieldVisitor.ts:85

visitAttribute

ts
visitAttribute(attr: Attribute): void

Visits a non standard attribute of the field.

Parameters

  • attr: Attribute an attribute.

Return Type

  • void

Defined in: packages/asm/libs/FieldVisitor.ts:126

visitEnd

ts
visitEnd(): void

Visits the end of the field. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the field have been visited.

Return Type

  • void

Defined in: packages/asm/libs/FieldVisitor.ts:137

visitTypeAnnotation

ts
visitTypeAnnotation(typeRef: number, typePath: null | TypePath, desc: null | string, visible: boolean): null | AnnotationVisitor

Visits an annotation on the type of the field.

Parameters

  • typeRef: number a reference to the annotated type. The sort of this type reference must be [TypeReference#FIELD FIELD]. See TypeReference.
  • typePath: null | TypePath the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be <tt>null</tt> if the annotation targets 'typeRef' as a whole.
  • desc: null | string the class descriptor of the annotation class.
  • visible: boolean <tt>true</tt> if the annotation is visible at runtime.

Return Type

  • null | AnnotationVisitor

Defined in: packages/asm/libs/FieldVisitor.ts:110

Released under the MIT License.