APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvm.hotspot.types.basic

public Class BasicField

extends Object
implements Field
Class Inheritance
All Implemented Interfaces
sun.jvm.hotspot.types.Field
Known Direct Subclasses
sun.jvm.hotspot.types.basic.BasicJBooleanField, sun.jvm.hotspot.types.basic.BasicJByteField, sun.jvm.hotspot.types.basic.BasicJCharField, sun.jvm.hotspot.types.basic.BasicJDoubleField, sun.jvm.hotspot.types.basic.BasicJFloatField, sun.jvm.hotspot.types.basic.BasicJIntField, sun.jvm.hotspot.types.basic.BasicJLongField, sun.jvm.hotspot.types.basic.BasicJShortField, sun.jvm.hotspot.types.basic.BasicOopField, sun.jvm.hotspot.types.basic.BasicCIntegerField
Imports
sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.types.*

A basic implementation of Field which should be suitable for cross-platform use.

Field Summary

Modifier and TypeField and Description
private Type
protected BasicTypeDataBase
private boolean
private String
private long
offset

Used for nonstatic fields only

private long
private Address
staticFieldAddress

Used for static fields only

protected Type

Constructor Summary

AccessConstructor and Description
public
public
BasicField(BasicTypeDataBase db, Type containingType, String name, Type type, boolean isStatic, long offsetInBytes, Address staticFieldAddress)

offsetInBytes is ignored if the field is static; staticFieldAddress is used only if the field is static.

Method Summary

Modifier and TypeMethod and Description
public Address
public Address
public long
public long
public boolean
getJBoolean(Address addr)

Implements sun.jvm.hotspot.types.Field.getJBoolean.

These accessors require that the field be nonstatic; otherwise, a WrongTypeException will be thrown.

public boolean
getJBoolean()

Implements sun.jvm.hotspot.types.Field.getJBoolean.

These accessors require that the field be static; otherwise, a WrongTypeException will be thrown.

public byte
public byte
public char
public char
public double
public double
public float
public float
public int
public int
public long
public long
public short
public short
public String
getName()

Implements sun.jvm.hotspot.types.Field.getName.

Get the name of this field

public OopHandle
public OopHandle
public long
getOffset()

Implements sun.jvm.hotspot.types.Field.getOffset.

The offset of this field, in bytes, in its containing data structure, if nonstatic.

public OopHandle
public OopHandle
public long
getSize()

Implements sun.jvm.hotspot.types.Field.getSize.

Get the size, in bytes, of this field.

public Address
getStaticFieldAddress()

Implements sun.jvm.hotspot.types.Field.getStaticFieldAddress.

The address of this field, if it is a static field.

public Type
getType()

Implements sun.jvm.hotspot.types.Field.getType.

Get the type of this field

public boolean
isStatic()

Implements sun.jvm.hotspot.types.Field.isStatic.

Is this a static field?

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containingTypeback to summary
private Type containingType
dbback to summary
protected BasicTypeDataBase db
isStaticback to summary
private boolean isStatic
nameback to summary
private String name
offsetback to summary
private long offset

Used for nonstatic fields only

sizeback to summary
private long size
staticFieldAddressback to summary
private Address staticFieldAddress

Used for static fields only

typeback to summary
protected Type type

Constructor Detail

BasicFieldback to summary
public BasicField(Field fld)
BasicFieldback to summary
public BasicField(BasicTypeDataBase db, Type containingType, String name, Type type, boolean isStatic, long offsetInBytes, Address staticFieldAddress)

offsetInBytes is ignored if the field is static; staticFieldAddress is used only if the field is static.

Method Detail

getAddressback to summary
public Address getAddress(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getAddress.

getAddressback to summary
public Address getAddress() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getAddress.

getCIntegerback to summary
public long getCInteger(Address addr, CIntegerType type) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getCInteger.

getCIntegerback to summary
public long getCInteger(CIntegerType type) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getCInteger.

getJBooleanback to summary
public boolean getJBoolean(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJBoolean.

Doc from sun.jvm.hotspot.types.Field.getJBoolean.

These accessors require that the field be nonstatic; otherwise, a WrongTypeException will be thrown. Note that type checking is not performed by these accessors in order to allow manual type coercion of field data. For better protection when accessing primitive fields, use the get(Type)Field accessors in Type.java.

NOTE that the Address passed in to these routines may, in fact, be an OopHandle. Specifically, in a reflective system, dereferencing operations applied to the OopHandle must be performed atomically with respect to GC.

See @see CIntegerType for a description of why all C integer types are bundled into the category "CIntegerType".

getJBooleanback to summary
public boolean getJBoolean() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJBoolean.

Doc from sun.jvm.hotspot.types.Field.getJBoolean.

These accessors require that the field be static; otherwise, a WrongTypeException will be thrown. Note that type checking is not performed by these accessors in order to allow manual type coercion of field data. For better protection when accessing primitive fields, use the get(Type)Field accessors in Type.java.

NOTE that the Address passed in to these routines may, in fact, be an OopHandle. Specifically, in a reflective system, dereferencing operations applied to the OopHandle must be performed atomically with respect to GC.

See @see CIntegerType for a description of why all C integer types are bundled into the category "CIntegerType".

getJByteback to summary
public byte getJByte(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJByte.

getJByteback to summary
public byte getJByte() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJByte.

getJCharback to summary
public char getJChar(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJChar.

getJCharback to summary
public char getJChar() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJChar.

getJDoubleback to summary
public double getJDouble(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJDouble.

getJDoubleback to summary
public double getJDouble() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJDouble.

getJFloatback to summary
public float getJFloat(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJFloat.

getJFloatback to summary
public float getJFloat() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJFloat.

getJIntback to summary
public int getJInt(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJInt.

getJIntback to summary
public int getJInt() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJInt.

getJLongback to summary
public long getJLong(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJLong.

getJLongback to summary
public long getJLong() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJLong.

getJShortback to summary
public short getJShort(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJShort.

getJShortback to summary
public short getJShort() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException

Implements sun.jvm.hotspot.types.Field.getJShort.

getNameback to summary
public String getName()

Implements sun.jvm.hotspot.types.Field.getName.

Doc from sun.jvm.hotspot.types.Field.getName.

Get the name of this field

getNarrowOopHandleback to summary
public OopHandle getNarrowOopHandle(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException

Implements sun.jvm.hotspot.types.Field.getNarrowOopHandle.

getNarrowOopHandleback to summary
public OopHandle getNarrowOopHandle() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException

Implements sun.jvm.hotspot.types.Field.getNarrowOopHandle.

getOffsetback to summary
public long getOffset() throws WrongTypeException

Implements sun.jvm.hotspot.types.Field.getOffset.

Doc from sun.jvm.hotspot.types.Field.getOffset.

The offset of this field, in bytes, in its containing data structure, if nonstatic. If this is a static field, throws a WrongTypeException.

getOopHandleback to summary
public OopHandle getOopHandle(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException

Implements sun.jvm.hotspot.types.Field.getOopHandle.

getOopHandleback to summary
public OopHandle getOopHandle() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException

Implements sun.jvm.hotspot.types.Field.getOopHandle.

getSizeback to summary
public long getSize()

Implements sun.jvm.hotspot.types.Field.getSize.

Doc from sun.jvm.hotspot.types.Field.getSize.

Get the size, in bytes, of this field. Used for manual data structure traversal where necessary.

getStaticFieldAddressback to summary
public Address getStaticFieldAddress() throws WrongTypeException

Implements sun.jvm.hotspot.types.Field.getStaticFieldAddress.

Doc from sun.jvm.hotspot.types.Field.getStaticFieldAddress.

The address of this field, if it is a static field. If this is a nonstatic field, throws a WrongTypeException.

getTypeback to summary
public Type getType()

Implements sun.jvm.hotspot.types.Field.getType.

Doc from sun.jvm.hotspot.types.Field.getType.

Get the type of this field

isStaticback to summary
public boolean isStatic()

Implements sun.jvm.hotspot.types.Field.isStatic.

Doc from sun.jvm.hotspot.types.Field.isStatic.

Is this a static field?