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.


Method Summary
 boolean equals(Object obj)
           
 Object get(Object objectWithField)
           
 boolean getBoolean(Object objectWithField)
           
 byte getByte(Object objectWithField)
           
 char getChar(Object objectWithField)
           
 IClass getDeclaringClass()
           
 double getDouble(Object objectWithField)
           
 float getFloat(Object objectWithField)
           
 int getInt(Object objectWithField)
           
 long getLong(Object objectWithField)
           
 int getModifiers()
           
 String getName()
           
 short getShort(Object objectWithField)
           
 IClass getType()
           
 boolean isAccessible()
           
 void set(Object obj, Object value)
           
 void setAccessible(boolean val)
           
 void setBoolean(Object obj, boolean value)
           
 void setByte(Object obj, byte value)
           
 void setChar(Object obj, char value)
           
 void setDouble(Object obj, double value)
           
 void setFloat(Object obj, float value)
           
 void setInt(Object obj, int value)
           
 void setLong(Object obj, long value)
           
 void setShort(Object obj, short value)
           
 String toString()
           
static IField wrapField(Field aField)
           
static IField[] wrapFields(Field[] fields)
           
 Field wrappedField()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu