|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JField
This interface represents a class field (static or not) and contains methods which permit to retrieve all informations about this field.
| Method Summary | |
|---|---|
java.lang.Object |
get(JClassInstance object)
Returns the value of the field represented by this Field, on the specified object. |
boolean |
getBoolean(JClassInstance object)
Gets the value of a static or instance boolean field. |
byte |
getByte(JClassInstance object)
Gets the value of a static or instance byte field. |
char |
getChar(JClassInstance object)
Gets the value of a static or instance char field. |
JClass |
getDeclaringClass()
Returns the JClass object representing the class or interface that declares the field represented by this JField object. |
java.lang.String |
getDescriptor()
Returns the descriptor of the field represented by this JField object, as a String. |
double |
getDouble(JClassInstance object)
Gets the value of a static or instance double field. |
float |
getFloat(JClassInstance object)
Gets the value of a static or instance float field. |
int |
getInt(JClassInstance object)
Gets the value of a static or instance int field. |
long |
getLong(JClassInstance object)
Gets the value of a static or instance long field. |
int |
getModifiers()
Returns the Java language modifiers for the field represented by this JField object, as an integer. |
java.lang.String |
getName()
Returns the name of the field represented by this JField object. |
java.lang.reflect.Field |
getNativeField()
Returns the java.lang.reflect.Field object equivalent to this JField object. |
short |
getShort(JClassInstance object)
Gets the value of a static or instance short field. |
JClass |
getType()
Returns a JClass object that identifies the declared type for the field represented by this JField object. |
boolean |
isStatic()
Determines if the field specified by this JField object is static. |
void |
set(JClassInstance object,
JHeapObject value)
Sets the field represented by this JField object on the specified object argument to the specified new value. |
void |
setBoolean(JClassInstance object,
boolean z)
Sets the value of a field as a boolean on the specified object. |
void |
setByte(JClassInstance object,
byte b)
Sets the value of a field as a byte on the specified object. |
void |
setChar(JClassInstance object,
char c)
Sets the value of a field as a char on the specified object. |
void |
setDouble(JClassInstance object,
double d)
Sets the value of a field as a double on the specified object. |
void |
setFloat(JClassInstance object,
float f)
Sets the value of a field as a float on the specified object. |
void |
setInt(JClassInstance object,
int i)
Sets the value of a field as a int on the specified object. |
void |
setLong(JClassInstance object,
long l)
Sets the value of a field as a long on the specified object. |
void |
setShort(JClassInstance object,
short s)
Sets the value of a field as a short on the specified object. |
| Method Detail |
|---|
JClass getDeclaringClass()
java.lang.String getName()
int getModifiers()
Modifierjava.lang.String getDescriptor()
JClass getType()
boolean isStatic()
java.lang.Object get(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - object from which the represented field's value is
to be extracted
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying field (or a
subclass or implementor thereof).
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
boolean getBoolean(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the boolean value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type boolean by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
byte getByte(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the byte value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type byte by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
char getChar(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the char value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type char by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
short getShort(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the short value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type short by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
int getInt(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the int value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type int by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
long getLong(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the long value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type long by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
float getFloat(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the float value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type float by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
double getDouble(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object to extract the double value
from
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not
an instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if the field value cannot be
converted to the type double by a widening conversion.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void set(JClassInstance object,
JHeapObject value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedvalue - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying field (or
a subclass or implementor thereof), or if an unwrapping conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setBoolean(JClassInstance object,
boolean z)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedz - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setByte(JClassInstance object,
byte b)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedb - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setChar(JClassInstance object,
char c)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedc - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setShort(JClassInstance object,
short s)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifieds - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setInt(JClassInstance object,
int i)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedi - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or interface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setLong(JClassInstance object,
long l)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedl - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or longerface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setFloat(JClassInstance object,
float f)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedf - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or floaterface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.
void setDouble(JClassInstance object,
double d)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
object - the object whose field should be modifiedd - the new value for the field of obj
being modified
java.lang.IllegalAccessException - if the underlying field is inaccessible.
java.lang.IllegalArgumentException - if the specified object is not an
instance of the class or doubleerface declaring the underlying
field (or a subclass or implementor thereof), or if an unwrapping
conversion fails.
java.lang.NullPointerException - if the specified object is null and the
field is an instance field.java.lang.reflect.Field getNativeField()
Field
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||