|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.umlv.corosol.component.impl.DefaultJField
public class DefaultJField
This is the default implementation of the JField interface.
| Constructor Summary | |
|---|---|
DefaultJField(JClass declaringClass,
JClassMember fieldInfo)
Creates a new DefaultJField object initialized with the specified class file item that containing the field datas and with the specified declaring class. |
|
| 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. |
java.lang.String |
toString()
Returns a string describing this DefaultJField. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultJField(JClass declaringClass,
JClassMember fieldInfo)
declaringClass - the class declaring the fieldfieldInfo - the class file item containing the field datas| Method Detail |
|---|
public java.lang.reflect.Field getNativeField()
getNativeField in interface JFieldFieldpublic JClass getDeclaringClass()
getDeclaringClass in interface JFieldpublic java.lang.String getName()
getName in interface JFieldpublic int getModifiers()
getModifiers in interface JFieldModifierpublic java.lang.String getDescriptor()
getDescriptor in interface JFieldpublic JClass getType()
getType in interface JFieldpublic boolean isStatic()
isStatic in interface JField
public java.lang.Object get(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
get in interface JFieldobject - 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.
public boolean getBoolean(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getBoolean in interface JFieldobject - 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.
public byte getByte(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getByte in interface JFieldobject - 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.
public char getChar(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getChar in interface JFieldobject - 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.
public short getShort(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getShort in interface JFieldobject - 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.
public int getInt(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getInt in interface JFieldobject - 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.
public long getLong(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getLong in interface JFieldobject - 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.
public float getFloat(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getFloat in interface JFieldobject - 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.
public double getDouble(JClassInstance object)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
getDouble in interface JFieldobject - 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.
public void set(JClassInstance object,
JHeapObject value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
set in interface JFieldobject - 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.
public void setBoolean(JClassInstance object,
boolean z)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setBoolean in interface JFieldobject - 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.
public void setByte(JClassInstance object,
byte b)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setByte in interface JFieldobject - 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.
public void setChar(JClassInstance object,
char c)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setChar in interface JFieldobject - 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.
public void setShort(JClassInstance object,
short s)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setShort in interface JFieldobject - 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.
public void setInt(JClassInstance object,
int i)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setInt in interface JFieldobject - 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.
public void setLong(JClassInstance object,
long l)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setLong in interface JFieldobject - 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.
public void setFloat(JClassInstance object,
float f)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setFloat in interface JFieldobject - 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.
public void setDouble(JClassInstance object,
double d)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
setDouble in interface JFieldobject - 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.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||