de.grogra.reflect
Class FieldBase

java.lang.Object
  extended by de.grogra.reflect.MemberBase
      extended by de.grogra.reflect.FieldBase
All Implemented Interfaces:
Field, Member
Direct Known Subclasses:
XField

public abstract class FieldBase
extends MemberBase
implements Field


Field Summary
protected  Type type
           
 
Fields inherited from class de.grogra.reflect.MemberBase
annots, declaringType, descriptor, modifiers, name
 
Fields inherited from interface de.grogra.reflect.Field
FIELD_0, INTERFACE_MODIFIERS, MODIFIERS
 
Fields inherited from interface de.grogra.reflect.Member
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Constructor Summary
FieldBase(java.lang.String name, int modifiers, Type declaringType, Type type)
           
 
Method Summary
 boolean getBoolean(java.lang.Object object)
           
 byte getByte(java.lang.Object object)
           
 char getChar(java.lang.Object object)
           
 java.lang.String getDescriptor()
          Returns a descriptor for this member.
 double getDouble(java.lang.Object object)
           
 float getFloat(java.lang.Object object)
           
 int getInt(java.lang.Object object)
           
 long getLong(java.lang.Object object)
           
 java.lang.Object getObject(java.lang.Object object)
           
 short getShort(java.lang.Object object)
           
 Type getType()
           
 void setBoolean(java.lang.Object object, boolean value)
           
 void setByte(java.lang.Object object, byte value)
           
 void setChar(java.lang.Object object, char value)
           
 void setDouble(java.lang.Object object, double value)
           
 void setFloat(java.lang.Object object, float value)
           
 void setInt(java.lang.Object object, int value)
           
 void setLong(java.lang.Object object, long value)
           
 void setObject(java.lang.Object object, java.lang.Object value)
           
 void setShort(java.lang.Object object, short value)
           
 java.lang.String toString()
           
 
Methods inherited from class de.grogra.reflect.MemberBase
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getModifiers, getName, getSimpleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.reflect.Member
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getModifiers, getName, getSimpleName
 

Field Detail

type

protected final Type type
Constructor Detail

FieldBase

public FieldBase(java.lang.String name,
                 int modifiers,
                 Type declaringType,
                 Type type)
Method Detail

getBoolean

public boolean getBoolean(java.lang.Object object)
                   throws java.lang.IllegalAccessException
Specified by:
getBoolean in interface Field
Throws:
java.lang.IllegalAccessException

getByte

public byte getByte(java.lang.Object object)
             throws java.lang.IllegalAccessException
Specified by:
getByte in interface Field
Throws:
java.lang.IllegalAccessException

getChar

public char getChar(java.lang.Object object)
             throws java.lang.IllegalAccessException
Specified by:
getChar in interface Field
Throws:
java.lang.IllegalAccessException

getDescriptor

public java.lang.String getDescriptor()
Description copied from interface: Member
Returns a descriptor for this member. Descriptors are constructed as follows:

Specified by:
getDescriptor in interface Member
Overrides:
getDescriptor in class MemberBase
Returns:
the member's descriptor

getDouble

public double getDouble(java.lang.Object object)
                 throws java.lang.IllegalAccessException
Specified by:
getDouble in interface Field
Throws:
java.lang.IllegalAccessException

getFloat

public float getFloat(java.lang.Object object)
               throws java.lang.IllegalAccessException
Specified by:
getFloat in interface Field
Throws:
java.lang.IllegalAccessException

getInt

public int getInt(java.lang.Object object)
           throws java.lang.IllegalAccessException
Specified by:
getInt in interface Field
Throws:
java.lang.IllegalAccessException

getLong

public long getLong(java.lang.Object object)
             throws java.lang.IllegalAccessException
Specified by:
getLong in interface Field
Throws:
java.lang.IllegalAccessException

getObject

public java.lang.Object getObject(java.lang.Object object)
                           throws java.lang.IllegalAccessException
Specified by:
getObject in interface Field
Throws:
java.lang.IllegalAccessException

getShort

public short getShort(java.lang.Object object)
               throws java.lang.IllegalAccessException
Specified by:
getShort in interface Field
Throws:
java.lang.IllegalAccessException

getType

public final Type getType()
Specified by:
getType in interface Field

setBoolean

public void setBoolean(java.lang.Object object,
                       boolean value)
                throws java.lang.IllegalAccessException
Specified by:
setBoolean in interface Field
Throws:
java.lang.IllegalAccessException

setByte

public void setByte(java.lang.Object object,
                    byte value)
             throws java.lang.IllegalAccessException
Specified by:
setByte in interface Field
Throws:
java.lang.IllegalAccessException

setChar

public void setChar(java.lang.Object object,
                    char value)
             throws java.lang.IllegalAccessException
Specified by:
setChar in interface Field
Throws:
java.lang.IllegalAccessException

setDouble

public void setDouble(java.lang.Object object,
                      double value)
               throws java.lang.IllegalAccessException
Specified by:
setDouble in interface Field
Throws:
java.lang.IllegalAccessException

setFloat

public void setFloat(java.lang.Object object,
                     float value)
              throws java.lang.IllegalAccessException
Specified by:
setFloat in interface Field
Throws:
java.lang.IllegalAccessException

setInt

public void setInt(java.lang.Object object,
                   int value)
            throws java.lang.IllegalAccessException
Specified by:
setInt in interface Field
Throws:
java.lang.IllegalAccessException

setLong

public void setLong(java.lang.Object object,
                    long value)
             throws java.lang.IllegalAccessException
Specified by:
setLong in interface Field
Throws:
java.lang.IllegalAccessException

setObject

public void setObject(java.lang.Object object,
                      java.lang.Object value)
               throws java.lang.IllegalAccessException
Specified by:
setObject in interface Field
Throws:
java.lang.IllegalAccessException

setShort

public void setShort(java.lang.Object object,
                     short value)
              throws java.lang.IllegalAccessException
Specified by:
setShort in interface Field
Throws:
java.lang.IllegalAccessException

toString

public java.lang.String toString()
Overrides:
toString in class MemberBase