APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.classfile.impl

public final Class FieldImpl

extends AbstractElement
implements FieldModel, Writable
Class Inheritance
All Implemented Interfaces
jdk.internal.classfile.impl.Util.Writable, java.lang.classfile.FieldModel, java.lang.classfile.ClassElement, java.lang.classfile.ClassFileElement, java.lang.classfile.AttributedElement, java.lang.classfile.CompoundElement, java.lang.Iterable
Imports
java.lang.classfile.AccessFlags, .Attribute, .ClassModel, .ClassReader, .FieldElement, .FieldModel, java.lang.classfile.constantpool.Utf8Entry, java.lang.reflect.AccessFlag, java.util.List, .Optional, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
private List<Attribute<?>>
private final int
private final int
private final ClassReader
private final int

Constructor Summary

AccessConstructor and Description
public
FieldImpl(ClassReader reader, int startPos, int endPos, int attributesPos)

Method Summary

Modifier and TypeMethod and Description
public List<Attribute<?>>
attributes()

Implements java.lang.classfile.AttributedElement.attributes.

Returns the attributes of this structure.

public Utf8Entry
fieldName()

Implements java.lang.classfile.FieldModel.fieldName.

Returns the name of this field.

public Utf8Entry
fieldType()

Implements java.lang.classfile.FieldModel.fieldType.

Returns the field descriptor string of this field.

public AccessFlags
flags()

Implements java.lang.classfile.FieldModel.flags.

Returns the access flags.

public void
forEach(Consumer<? super FieldElement> consumer)

Implements java.lang.classfile.CompoundElement.forEach.

Invokes the provided handler with each member element in this compound element.

public Optional<ClassModel>
parent()

Implements java.lang.classfile.FieldModel.parent.

Returns the class model this field is a member of, if known.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
public void
Inherited from jdk.internal.classfile.impl.AbstractElement:
writeTowriteTowriteTo

Field Detail

attributesback to summary
private List<Attribute<?>> attributes
attributesPosback to summary
private final int attributesPos
endPosback to summary
private final int endPos
readerback to summary
private final ClassReader reader
startPosback to summary
private final int startPos

Constructor Detail

FieldImplback to summary
public FieldImpl(ClassReader reader, int startPos, int endPos, int attributesPos)

Method Detail

attributesback to summary
public List<Attribute<?>> attributes()

Implements java.lang.classfile.AttributedElement.attributes.

Doc from java.lang.classfile.AttributedElement.attributes.

Returns the attributes of this structure.

Annotations
@Override
fieldNameback to summary
public Utf8Entry fieldName()

Implements java.lang.classfile.FieldModel.fieldName.

Doc from java.lang.classfile.FieldModel.fieldName.

Returns the name of this field.

Annotations
@Override
fieldTypeback to summary
public Utf8Entry fieldType()

Implements java.lang.classfile.FieldModel.fieldType.

Doc from java.lang.classfile.FieldModel.fieldType.

Returns the field descriptor string of this field.

Annotations
@Override
flagsback to summary
public AccessFlags flags()

Implements java.lang.classfile.FieldModel.flags.

Doc from java.lang.classfile.FieldModel.flags.

Returns the access flags.

Annotations
@Override
forEachback to summary
public void forEach(Consumer<? super FieldElement> consumer)

Implements java.lang.classfile.CompoundElement.forEach.

Doc from java.lang.classfile.CompoundElement.forEach.

Invokes the provided handler with each member element in this compound element.

Annotations
@Override
parentback to summary
public Optional<ClassModel> parent()

Implements java.lang.classfile.FieldModel.parent.

Doc from java.lang.classfile.FieldModel.parent.

Returns the class model this field is a member of, if known.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
writeToback to summary
public void writeTo(BufWriterImpl buf)

Implements jdk.internal.classfile.impl.Util.Writable.writeTo.

Annotations
@Override
writeToback to summary
public void writeTo(DirectClassBuilder builder)

Overrides jdk.internal.classfile.impl.AbstractElement.writeTo.

Annotations
@Override