TypeComponent
for general information about Field and Method mirrors.
ObjectReference, ReferenceType
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public int | |
| public boolean | Returns: true if this field represents an enum constant;
false otherwise.Determine if this is a field that represents an enum constant. |
| public boolean | Returns: true if this field is transient; false otherwise.Determine if this is a transient field. |
| public boolean | Returns: true if this field is volatile; false otherwise.Determine if this is a volatile field. |
| public Type | |
| public String | Returns: a String representing the type of this field.Returns a text representation of the type of this field. |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Compares the specified Object with this field for equality.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Returns the hash code value for this Field.
| |
| isEnumConstant | back to summary |
|---|---|
| public boolean isEnumConstant() Determine if this is a field that represents an enum constant.
| |
| isTransient | back to summary |
|---|---|
| public boolean isTransient() Determine if this is a transient field.
| |
| isVolatile | back to summary |
|---|---|
| public boolean isVolatile() Determine if this is a volatile field.
| |
| type | back to summary |
|---|---|
| public Type type() throws ClassNotLoadedException Returns the type of this field. Where the type is the type specified in the declaration of this field. For example, if a target class defines: short s; Date d; byte[] ba;And the JDI client defines these Field objects:
Field sField = targetClass.fieldByName("s");
Field dField = targetClass.fieldByName("d");
Field baField = targetClass.fieldByName("ba");
to mirror the corresponding fields, then sField.type()
is a ShortType, dField.type() is the
ReferenceType for java.util.Date and
((ArrayType)(baField.type())).componentType() is a
ByteType.Note if the type of this field is a reference type (class,
interface, or array) and it has not been created or loaded
by the declaring type's class loader - that is,
| |
| typeName | back to summary |
|---|---|
| public String typeName() Returns a text representation of the type of this field. Where the type is the type specified in the declaration of this field. This type name is always available even if the type has not yet been created or loaded.
| |