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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interface JavaMember
- Parameters:
obj
-
- Returns:
- True obj refers to the same Java Field in the image
hashCode
public int hashCode()
- Specified by:
hashCode
in interface JavaMember