edu.mit.ai.psg.jeva
Class WrappedField
java.lang.Object
|
+--edu.mit.ai.psg.jeva.WrappedField
- public class WrappedField
- extends Object
- implements IField
WrappedClass wraps binary Field objects to implement IField
Invariant: if fieldA == fieldB, their wrappers are == also.
wrapField
public static IField wrapField(Field aField)
wrapFields
public static IField[] wrapFields(Field[] fields)
wrappedField
public Field wrappedField()
getDeclaringClass
public IClass getDeclaringClass()
getName
public String getName()
getModifiers
public int getModifiers()
isAccessible
public boolean isAccessible()
setAccessible
public void setAccessible(boolean val)
getType
public IClass getType()
- Specified by:
- getType in interface IField
get
public Object get(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- get in interface IField
getBoolean
public boolean getBoolean(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getBoolean in interface IField
getByte
public byte getByte(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getByte in interface IField
getChar
public char getChar(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getChar in interface IField
getShort
public short getShort(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getShort in interface IField
getInt
public int getInt(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getInt in interface IField
getLong
public long getLong(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getLong in interface IField
getFloat
public float getFloat(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getFloat in interface IField
getDouble
public double getDouble(Object objectWithField)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- getDouble in interface IField
set
public void set(Object obj,
Object value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- set in interface IField
setBoolean
public void setBoolean(Object obj,
boolean value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setBoolean in interface IField
setByte
public void setByte(Object obj,
byte value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setByte in interface IField
setChar
public void setChar(Object obj,
char value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setChar in interface IField
setShort
public void setShort(Object obj,
short value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setShort in interface IField
setInt
public void setInt(Object obj,
int value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setInt in interface IField
setLong
public void setLong(Object obj,
long value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setLong in interface IField
setFloat
public void setFloat(Object obj,
float value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setFloat in interface IField
setDouble
public void setDouble(Object obj,
double value)
throws IllegalArgumentException,
IllegalAccessException
- Specified by:
- setDouble in interface IField
toString
public String toString()
- Overrides:
- toString in class Object
equals
public boolean equals(Object obj)
- Overrides:
- equals in class Object