|
Java Debug Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class or instance variable in the target VM.
See TypeComponent
for general information about Field and Method mirrors.
ObjectReference
,
ReferenceType
Method Summary | |
boolean |
equals(Object obj)
Compares the specified Object with this field for equality. |
int |
hashCode()
Returns the hash code value for this Field. |
boolean |
isTransient()
Determine if this is a transient field. |
boolean |
isVolatile()
Determine if this is a volatile field. |
Type |
type()
Returns the type of this field. |
String |
typeName()
Returns a text representation of the type of this field. |
Methods inherited from interface com.sun.jdi.TypeComponent |
declaringType, isFinal, isStatic, isSynthetic, name, signature |
Methods inherited from interface com.sun.jdi.Mirror |
toString, virtualMachine |
Methods inherited from interface com.sun.jdi.Accessible |
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public String typeName()
This type name is always available even if the type has not yet been created or loaded.
public Type type() throws ClassNotLoadedException
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,
declaringType()
.classLoader()
,
then ClassNotLoadedException will be thrown.
Also, a reference type may have been loaded but not yet prepared,
in which case the type will be returned
but attempts to perform some operations on the returned type
(e.g. fields()
) will throw
a ClassNotPreparedException
.
Use ReferenceType.isPrepared()
to determine if
a reference type is prepared.
Type
of this field.
ClassNotLoadedException
- if the type has not yet been loaded
or created through the appropriate class loader.Type
public boolean isTransient()
true
if this field is transient; false otherwise.public boolean isVolatile()
true
if this field is volatile; false otherwise.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Java Debug Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |