java.lang.reflect
Class Field

java.lang.Object
  extended byjava.lang.reflect.Field
All Implemented Interfaces:
Member

public class Field
extends Object
implements Member


Field Summary
 
Fields inherited from interface java.lang.reflect.Member
DECLARED, PUBLIC
 
Constructor Summary
Field(Field field)
           
 
Method Summary
 boolean equals(Object other)
          Returns if this object is considered equal to the other object.
 Object get(Object src)
           
 boolean getBoolean(Object dest)
           
 byte getByte(Object dest)
           
 char getChar(Object dest)
           
 Class getDeclaringClass()
          Gets the class that declared this member.
 double getDouble(Object dest)
           
 float getFloat(Object dest)
           
 int getInt(Object dest)
           
 long getLong(Object dest)
           
 int getModifiers()
          Gets the modifiers this member uses.
 String getName()
          Gets the simple name of this member.
 short getShort(Object dest)
           
 Class getType()
          Return the type of the Field as a Class object.
 int hashCode()
          Returns a hashCode for the object.
 void set(Object dest, Object value)
           
 void setBoolean(Object dest, boolean value)
           
 void setByte(Object dest, byte value)
           
 void setChar(Object dest, char value)
           
 void setDouble(Object dest, double value)
           
 void setFloat(Object dest, float value)
           
 void setInt(Object dest, int value)
           
 void setLong(Object dest, long value)
           
 void setShort(Object dest, short value)
           
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass
 

Constructor Detail

Field

public Field(Field field)
Method Detail

getName

public String getName()
Description copied from interface: Member
Gets the simple name of this member. This will be a valid Java identifier, with no qualification.

Specified by:
getName in interface Member
Returns:
the name of this member

getModifiers

public int getModifiers()
Description copied from interface: Member
Gets the modifiers this member uses. Use the Modifier class to interpret the values.

Specified by:
getModifiers in interface Member
Returns:
an integer representing the modifiers to this Member
See Also:
Modifier

getDeclaringClass

public Class getDeclaringClass()
Description copied from interface: Member
Gets the class that declared this member. This is not the class where this method was called, or even the class where this Member object came to life, but the class that declares the member this represents.

Specified by:
getDeclaringClass in interface Member
Returns:
the class that declared this member

hashCode

public int hashCode()
Description copied from class: Object
Returns a hashCode for the object. The general contract of hashCode is:
  • An object must return the same hash code for its entire existence.
  • If two objects are considered equal by the equals() method, they should return the same hash code. Not all Objects will do this and you should only use hashCode() from Objects which declare an overrided version of hashCode(). The only Objects which provide consistent and correct hash codes under Ewe are Object, String and Class.

    Overrides:
    hashCode in class Object

  • getType

    public Class getType()
    Return the type of the Field as a Class object.


    equals

    public boolean equals(Object other)
    Description copied from class: Object
    Returns if this object is considered equal to the other object.

    Overrides:
    equals in class Object
    Parameters:
    other - Another object to compare to.
    Returns:
    true if this object is considered equal to the other object.

    set

    public void set(Object dest,
                    Object value)
             throws IllegalArgumentException,
                    IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    get

    public Object get(Object src)
               throws IllegalArgumentException,
                      IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    toString

    public String toString()
    Description copied from class: Object
    Return a String representation of this object.

    Overrides:
    toString in class Object
    Returns:
    a String representing this object.

    setBoolean

    public void setBoolean(Object dest,
                           boolean value)
                    throws IllegalArgumentException,
                           IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setByte

    public void setByte(Object dest,
                        byte value)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setChar

    public void setChar(Object dest,
                        char value)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setDouble

    public void setDouble(Object dest,
                          double value)
                   throws IllegalArgumentException,
                          IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setFloat

    public void setFloat(Object dest,
                         float value)
                  throws IllegalArgumentException,
                         IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setInt

    public void setInt(Object dest,
                       int value)
                throws IllegalArgumentException,
                       IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setLong

    public void setLong(Object dest,
                        long value)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    setShort

    public void setShort(Object dest,
                         short value)
                  throws IllegalArgumentException,
                         IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getBoolean

    public boolean getBoolean(Object dest)
                       throws IllegalArgumentException,
                              IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getByte

    public byte getByte(Object dest)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getChar

    public char getChar(Object dest)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getDouble

    public double getDouble(Object dest)
                     throws IllegalArgumentException,
                            IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getFloat

    public float getFloat(Object dest)
                   throws IllegalArgumentException,
                          IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getInt

    public int getInt(Object dest)
               throws IllegalArgumentException,
                      IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getLong

    public long getLong(Object dest)
                 throws IllegalArgumentException,
                        IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException

    getShort

    public short getShort(Object dest)
                   throws IllegalArgumentException,
                          IllegalAccessException
    Throws:
    IllegalArgumentException
    IllegalAccessException