Top Description Fields Constructors Methods
net.bytebuddy.jar.asm

public abstract Class FieldVisitor

extends Object
Class Inheritance
Known Direct Subclasses
net.bytebuddy.jar.asm.FieldWriter, net.bytebuddy.jar.asm.commons.FieldRemapper, net.bytebuddy.pool.TypePool.Default.TypeExtractor.FieldExtractor, net.bytebuddy.asm.MemberAttributeExtension.ForField.FieldAttributeVisitor, net.bytebuddy.asm.TypeReferenceAdjustment.TypeReferenceClassVisitor.TypeReferenceFieldVisitor, net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ValidatingClassVisitor.ValidatingFieldVisitor, net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.WithFullProcessing.RedefinitionClassVisitor.AttributeObtainingFieldVisitor

A visitor to visit a Java field. The methods of this class must be called in the following order: ( visitAnnotation | visitTypeAnnotation | visitAttribute )* visitEnd.
Author
Eric Bruneton

Field Summary

Modifier and TypeField and Description
protected final int
api

The ASM API version implemented by this visitor.

protected FieldVisitor
fv

The field visitor to which this visitor must delegate method calls.

Constructor Summary

AccessConstructor and Description
protected
FieldVisitor(final int
the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.
api
)

Constructs a new FieldVisitor.

protected
FieldVisitor(final int
the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.
api
,
final FieldVisitor
the field visitor to which this visitor must delegate method calls. May be null.
fieldVisitor
)

Constructs a new FieldVisitor.

Method Summary

Modifier and TypeMethod and Description
public FieldVisitor

Returns:

the field visitor to which this visitor must delegate method calls, or null.
getDelegate
()

The field visitor to which this visitor must delegate method calls.

public AnnotationVisitor

Returns:

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.
visitAnnotation
(final String
the class descriptor of the annotation class.
descriptor
,
final boolean
true if the annotation is visible at runtime.
visible
)

Visits an annotation of the field.

public void
visitAttribute(final Attribute
an attribute.
attribute
)

Visits a non standard attribute of the field.

public void
visitEnd()

Visits the end of the field.

public AnnotationVisitor

Returns:

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.
visitTypeAnnotation
(final int
a reference to the annotated type. The sort of this type reference must be TypeReference#FIELD. See TypeReference.
typeRef
,
final TypePath
the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be null if the annotation targets 'typeRef' as a whole.
typePath
,
final String
the class descriptor of the annotation class.
descriptor
,
final boolean
true if the annotation is visible at runtime.
visible
)

Visits an annotation on the type of the field.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

apiback to summary
protected final int api

The ASM API version implemented by this visitor. The value of this field must be one of the ASMx values in Opcodes.

fvback to summary
protected FieldVisitor fv

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

Constructor Detail

FieldVisitorback to summary
protected FieldVisitor(final int api)

Constructs a new FieldVisitor.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.

FieldVisitorback to summary
protected FieldVisitor(final int api, final FieldVisitor fieldVisitor)

Constructs a new FieldVisitor.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.

fieldVisitor:FieldVisitor

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

Method Detail

getDelegateback to summary
public FieldVisitor getDelegate()

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

Returns:FieldVisitor

the field visitor to which this visitor must delegate method calls, or null.

visitAnnotationback to summary
public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible)

Visits an annotation of the field.

Parameters
descriptor:String

the class descriptor of the annotation class.

visible:boolean

true if the annotation is visible at runtime.

Returns:AnnotationVisitor

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.

visitAttributeback to summary
public void visitAttribute(final Attribute attribute)

Visits a non standard attribute of the field.

Parameters
attribute:Attribute

an attribute.

visitEndback to summary
public void visitEnd()

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.

visitTypeAnnotationback to summary
public AnnotationVisitor visitTypeAnnotation(final int typeRef, final TypePath typePath, final String descriptor, final boolean visible)

Visits an annotation on the type of the field.

Parameters
typeRef:int

a reference to the annotated type. The sort of this type reference must be TypeReference#FIELD. See TypeReference.

typePath:TypePath

the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be null if the annotation targets 'typeRef' as a whole.

descriptor:String

the class descriptor of the annotation class.

visible:boolean

true if the annotation is visible at runtime.

Returns:AnnotationVisitor

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.