APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.jvm.hotspot.oops

public Class Field

extends Object
Class Inheritance
Known Direct Subclasses
sun.jvm.hotspot.oops.FloatField, sun.jvm.hotspot.oops.IntField, sun.jvm.hotspot.oops.LongField, sun.jvm.hotspot.oops.MetadataField, sun.jvm.hotspot.oops.OopField, sun.jvm.hotspot.oops.ShortField, sun.jvm.hotspot.oops.BooleanField, sun.jvm.hotspot.oops.ByteField, sun.jvm.hotspot.oops.CharField, sun.jvm.hotspot.oops.CIntField, sun.jvm.hotspot.oops.DoubleField
Imports
java.io.*, sun.jvm.hotspot.code.CompressedReadStream, sun.jvm.hotspot.runtime.*, sun.jvm.hotspot.utilities.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private AccessFlags
private int
private FieldType
private Symbol
private InstanceKlass
private FieldIdentifier
private boolean
private Symbol
private long
private Symbol
pack-priv Field.FieldInfoValues

Constructor Summary

AccessConstructor and Description
pack-priv
Field(FieldIdentifier id, long offset, boolean isVMField)

private
Field(InstanceKlass holder, int fieldIndex, Field.FieldInfoValues values)

Constructor for fields that are named in an InstanceKlass's fields array (i.e., named, non-VM fields)

pack-priv
Field(InstanceKlass holder, int fieldIndex)

Constructor for cloning an existing Field object

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private static boolean
fieldIsContended(int flags)

private static boolean
fieldIsGeneric(int flags)

private static boolean
fieldIsInitialized(int flags)

private static boolean
fieldIsInjected(int flags)

private static boolean
fieldIsStable(int flags)

public long
getAccessFlags()

(Named, non-VM fields only) Retrieves the access flags.

public AccessFlags
public InstanceKlass
getFieldHolder()

(Named, non-VM fields only) Returns the InstanceKlass containing this (static or non-static) field.

public int
getFieldIndex()

(Named, non-VM fields only) Returns the index in the fields TypeArray for this field.

public static Field[]
public FieldType
getFieldType()

(Named, non-VM fields only) Returns the type of this field.

public Symbol
public int
public FieldIdentifier
getID()

Returns the identifier of the field

public int
public Symbol
public int
public long
getOffset()

Returns the byte offset of the field within the object or klass

public Symbol
getSignature()

(Named, non-VM fields only) Returns the signature of this field.

public int
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isNamedField()

Indicates whether this is a named field

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isVMField()

Indicates whether this is a VM field

public boolean
public void
pack-priv static Field.FieldInfoValues
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

accessFlagsback to summary
private AccessFlags accessFlags
fieldIndexback to summary
private int fieldIndex
fieldTypeback to summary
private FieldType fieldType
genericSignatureback to summary
private Symbol genericSignature
holderback to summary
private InstanceKlass holder
idback to summary
private FieldIdentifier id
isVMFieldback to summary
private boolean isVMField
nameback to summary
private Symbol name
offsetback to summary
private long offset
signatureback to summary
private Symbol signature
valuesback to summary
pack-priv Field.FieldInfoValues values

Constructor Detail

Fieldback to summary
pack-priv Field(FieldIdentifier id, long offset, boolean isVMField)
Fieldback to summary
private Field(InstanceKlass holder, int fieldIndex, Field.FieldInfoValues values)

Constructor for fields that are named in an InstanceKlass's fields array (i.e., named, non-VM fields)

Fieldback to summary
pack-priv Field(InstanceKlass holder, int fieldIndex)

Constructor for cloning an existing Field object

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

fieldIsContendedback to summary
private static boolean fieldIsContended(int flags)
fieldIsGenericback to summary
private static boolean fieldIsGeneric(int flags)
fieldIsInitializedback to summary
private static boolean fieldIsInitialized(int flags)
fieldIsInjectedback to summary
private static boolean fieldIsInjected(int flags)
fieldIsStableback to summary
private static boolean fieldIsStable(int flags)
getAccessFlagsback to summary
public long getAccessFlags()

(Named, non-VM fields only) Retrieves the access flags.

getAccessFlagsObjback to summary
public AccessFlags getAccessFlagsObj()
getFieldHolderback to summary
public InstanceKlass getFieldHolder()

(Named, non-VM fields only) Returns the InstanceKlass containing this (static or non-static) field.

getFieldIndexback to summary
public int getFieldIndex()

(Named, non-VM fields only) Returns the index in the fields TypeArray for this field. Equivalent to the "index" in the VM's fieldDescriptors.

getFieldsback to summary
public static Field[] getFields(InstanceKlass kls)
getFieldTypeback to summary
public FieldType getFieldType()

(Named, non-VM fields only) Returns the type of this field.

getGenericSignatureback to summary
public Symbol getGenericSignature()
getGenericSignatureIndexback to summary
public int getGenericSignatureIndex()
getIDback to summary
public FieldIdentifier getID()

Returns the identifier of the field

getInitialValueIndexback to summary
public int getInitialValueIndex()
getNameback to summary
public Symbol getName()
getNameIndexback to summary
public int getNameIndex()
getOffsetback to summary
public long getOffset()

Returns the byte offset of the field within the object or klass

getSignatureback to summary
public Symbol getSignature()

(Named, non-VM fields only) Returns the signature of this field.

getSignatureIndexback to summary
public int getSignatureIndex()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
hasInitialValueback to summary
public boolean hasInitialValue()
isContendedback to summary
public boolean isContended()
isEnumConstantback to summary
public boolean isEnumConstant()
isFinalback to summary
public boolean isFinal()
isGenericback to summary
public boolean isGeneric()
isInitializedback to summary
public boolean isInitialized()
isInjectedback to summary
public boolean isInjected()
isNamedFieldback to summary
public boolean isNamedField()

Indicates whether this is a named field

isPackagePrivateback to summary
public boolean isPackagePrivate()
isPrivateback to summary
public boolean isPrivate()
isProtectedback to summary
public boolean isProtected()
isPublicback to summary
public boolean isPublic()
isStableback to summary
public boolean isStable()
isStaticback to summary
public boolean isStatic()
isSyntheticback to summary
public boolean isSynthetic()
isTransientback to summary
public boolean isTransient()
isVMFieldback to summary
public boolean isVMField()

Indicates whether this is a VM field

isVolatileback to summary
public boolean isVolatile()
printOnback to summary
public void printOn(PrintStream tty)
readFieldInfoValuesback to summary
pack-priv static Field.FieldInfoValues readFieldInfoValues(CompressedReadStream crs)
sun.jvm.hotspot.oops back to summary

pack-priv Class Field.FieldInfoValues

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessFlagsback to summary
pack-priv int accessFlags
contendedGroupback to summary
pack-priv int contendedGroup
fieldFlagsback to summary
pack-priv int fieldFlags
genericSignatureIndexback to summary
pack-priv int genericSignatureIndex
initialValueIndexback to summary
pack-priv int initialValueIndex
nameIndexback to summary
pack-priv int nameIndex
offsetback to summary
pack-priv int offset
signatureIndexback to summary
pack-priv int signatureIndex

Constructor Detail

FieldInfoValuesback to summary
pack-priv FieldInfoValues()