com.ibm.dtfj.java
Interface JavaField
- All Superinterfaces:
- JavaMember
public interface JavaField
- extends JavaMember
Represents a field declaration.
It is modelled on java.lang.reflect.Field
get
java.lang.Object get(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Parameters:
object
- to fetch the field from. Ignored for static
fields.
- Returns:
- a JavaObject instance for reference type fields,
an instance of a subclass of Number, Boolean, or Character
for primitive fields, or null for null reference fields.
This field must be declared in the object's class or in a superclass
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field
CorruptDataException
MemoryAccessException
- See Also:
JavaObject
,
Byte
,
Double
,
Float
,
Integer
,
Long
,
Short
,
Character
,
Boolean
getBoolean
boolean getBoolean(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to boolean
CorruptDataException
MemoryAccessException
getByte
byte getByte(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to byte
CorruptDataException
MemoryAccessException
getChar
char getChar(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to char
CorruptDataException
MemoryAccessException
getDouble
double getDouble(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to double
CorruptDataException
MemoryAccessException
getFloat
float getFloat(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to float
CorruptDataException
MemoryAccessException
getInt
int getInt(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to int
CorruptDataException
MemoryAccessException
getLong
long getLong(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to long
CorruptDataException
MemoryAccessException
getShort
short getShort(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Throws:
java.lang.NullPointerException
- if the field is an instance field, and object is null
java.lang.IllegalArgumentException
- if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to short
CorruptDataException
MemoryAccessException
getString
java.lang.String getString(JavaObject object)
throws CorruptDataException,
MemoryAccessException
- Parameters:
object
- to fetch the field from. Ignored for static
fields.
- Returns:
- a String representing the value of the String field. Note that the instance
returned can be null if the field was null in object.
- Throws:
java.lang.IllegalArgumentException
- if the specified field is not a String
java.lang.NullPointerException
- if the field is an instance field, and object is null
CorruptDataException
MemoryAccessException
equals
boolean equals(java.lang.Object obj)
- Specified by:
equals
in interface JavaMember
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
-
- Returns:
- True obj refers to the same Java Field in the image
hashCode
int hashCode()
- Specified by:
hashCode
in interface JavaMember
- Overrides:
hashCode
in class java.lang.Object