APIdia Launch Partner
Top Description Methods
sun.jvm.hotspot.types

public Interface Type

Known Direct Subinterfaces
sun.jvm.hotspot.types.CIntegerType, sun.jvm.hotspot.types.PointerType
Known Direct Implementers
sun.jvm.hotspot.types.basic.BasicType
Imports
java.util.*

This is the top-level interface which describes C++ classes and primitive types as well as enough about Java primitive and object types to allow the oop hierarchy to be constructed.

Method Summary

Modifier and TypeMethod and Description
public AddressField
public CIntegerField
public Field
getField(String fieldName, boolean searchSuperclassFields, boolean throwExceptionIfNotFound)

This is permissive and returns the CField regardless of its type as long as it is present.

public Field
getField(String fieldName, boolean searchSuperclassFields)

This is permissive and returns the CField regardless of its type as long as it is present -- it is equivalent to getField(fieldName, searchSuperclassFields, true).

public Field
getField(String fieldName)

This is permissive and returns the CField regardless of its type as long as it is present.

public Field
getField(String fieldName, Type declaredType, boolean searchSuperclassFields)

If there is a mismatch between the declared type and the type which would otherwise be returned from this routine, it throws a WrongTypeException.

public Field
getField(String fieldName, Type declaredType)

If there is a mismatch between the declared type and the type which would otherwise be returned from this routine, it throws a WrongTypeException.

public Iterator<E>
getFields()

Iterate over all of the fields in this type but not in any of its superclasses.

public JBooleanField
getJBooleanField(String fieldName)

These accessors are designed to allow strong type checking of certain well-known types of fields, specifically Java primitive and oop types.

public JByteField
getJByteField(String fieldName)

public JCharField
getJCharField(String fieldName)

public JDoubleField
public JFloatField
public JIntField
getJIntField(String fieldName)

public JLongField
getJLongField(String fieldName)

public JShortField
public String
public NarrowOopField
public OopField
getOopField(String fieldName)

public long
getSize()

The size in bytes, at the machine level, of this type.

public Type
public boolean
isCIntegerType()

Indicates whether this type is a C integer type -- regardless of size or signedness.

public boolean
isCStringType()

Indicates whether this type is const char*.

public boolean
isJavaPrimitiveType()

Indicates whether this type is one of the Java primitive types.

public boolean
isOopType()

Indicates whether this type is an oop type in the VM.

public boolean
isPointerType()

Indicates whether this type is a pointer type.

Method Detail

getAddressFieldback to summary
public AddressField getAddressField(String fieldName)
getCIntegerFieldback to summary
public CIntegerField getCIntegerField(String fieldName) throws WrongTypeException
getFieldback to summary
public Field getField(String fieldName, boolean searchSuperclassFields, boolean throwExceptionIfNotFound)

This is permissive and returns the CField regardless of its type as long as it is present. Returns null if the field was not found, unless throwExceptionIfNotFound is true, in which case a RuntimeException is thrown (for debugging purposes).

getFieldback to summary
public Field getField(String fieldName, boolean searchSuperclassFields)

This is permissive and returns the CField regardless of its type as long as it is present -- it is equivalent to getField(fieldName, searchSuperclassFields, true). Throws a RuntimeException if the field was not found.

getFieldback to summary
public Field getField(String fieldName)

This is permissive and returns the CField regardless of its type as long as it is present. This does not search superclasses' fields; it is equivalent to getField(fieldName, false). Throws a RuntimeException if the field was not found.

getFieldback to summary
public Field getField(String fieldName, Type declaredType, boolean searchSuperclassFields) throws WrongTypeException

If there is a mismatch between the declared type and the type which would otherwise be returned from this routine, it throws a WrongTypeException. declaredType must not be null. Throws a RuntimeException if field was otherwise not found.

getFieldback to summary
public Field getField(String fieldName, Type declaredType) throws WrongTypeException

If there is a mismatch between the declared type and the type which would otherwise be returned from this routine, it throws a WrongTypeException. declaredType must not be null. This does not search superclasses' fields; it is equivalent to getField(fieldName, declaredType, false). Throws a RuntimeException if field was otherwise not found.

getFieldsback to summary
public Iterator<E> getFields()

Iterate over all of the fields in this type but not in any of its superclasses. The returned Iterator's "remove" method must not be called.

getJBooleanFieldback to summary
public JBooleanField getJBooleanField(String fieldName) throws WrongTypeException

These accessors are designed to allow strong type checking of certain well-known types of fields, specifically Java primitive and oop types. Specialized fields for all primitive types, as well as oop fields, are required to have strong type checking and a WrongTypeException should be thrown if the given field is not precisely of the given type. Address and Oop fields are more permissive to reduce the complexity of the initial implementation.

These accessors do not search the superclass's fields.

getJByteFieldback to summary
public JByteField getJByteField(String fieldName) throws WrongTypeException
getJCharFieldback to summary
public JCharField getJCharField(String fieldName) throws WrongTypeException
getJDoubleFieldback to summary
public JDoubleField getJDoubleField(String fieldName) throws WrongTypeException
getJFloatFieldback to summary
public JFloatField getJFloatField(String fieldName) throws WrongTypeException
getJIntFieldback to summary
public JIntField getJIntField(String fieldName) throws WrongTypeException
getJLongFieldback to summary
public JLongField getJLongField(String fieldName) throws WrongTypeException
getJShortFieldback to summary
public JShortField getJShortField(String fieldName) throws WrongTypeException
getNameback to summary
public String getName()
getNarrowOopFieldback to summary
public NarrowOopField getNarrowOopField(String fieldName) throws WrongTypeException
getOopFieldback to summary
public OopField getOopField(String fieldName) throws WrongTypeException
getSizeback to summary
public long getSize()

The size in bytes, at the machine level, of this type. This should be equivalent to the sizeof operator -- i.e., should include any compiler-inserted fields like the vtbl for C++ types.

getSuperclassback to summary
public Type getSuperclass()
isCIntegerTypeback to summary
public boolean isCIntegerType()

Indicates whether this type is a C integer type -- regardless of size or signedness.

isCStringTypeback to summary
public boolean isCStringType()

Indicates whether this type is const char*.

isJavaPrimitiveTypeback to summary
public boolean isJavaPrimitiveType()

Indicates whether this type is one of the Java primitive types.

isOopTypeback to summary
public boolean isOopType()

Indicates whether this type is an oop type in the VM.

isPointerTypeback to summary
public boolean isPointerType()

Indicates whether this type is a pointer type.