Java in a Nutshell Online Quick Reference for Java 1.1

CLASS java.lang.reflect.Field

Availability: JDK 1.1

public final class Field extends Object implements Member {
   // No Constructor
   // Public Instance Methods
      public boolean equals(Object obj);  // Overrides Object.equals()
      public native Object get(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native boolean getBoolean(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native byte getByte(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native char getChar(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public Class getDeclaringClass();
      public native double getDouble(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native float getFloat(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native int getInt(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native long getLong(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public native int getModifiers();
      public String getName();
      public native short getShort(Object obj) throws IllegalArgumentException, IllegalAccessException;
      public Class getType();
      public int hashCode();  // Overrides Object.hashCode()
      public native void set(Object obj, Object value) throws IllegalArgumentException, IllegalAccessException;
      public native void setBoolean(Object obj, boolean z) throws IllegalArgumentException, IllegalAccessException;
      public native void setByte(Object obj, byte b) throws IllegalArgumentException, IllegalAccessException;
      public native void setChar(Object obj, char c) throws IllegalArgumentException, IllegalAccessException;
      public native void setDouble(Object obj, double d) throws IllegalArgumentException, IllegalAccessException;
      public native void setFloat(Object obj, float f) throws IllegalArgumentException, IllegalAccessException;
      public native void setInt(Object obj, int i) throws IllegalArgumentException, IllegalAccessException;
      public native void setLong(Object obj, long l) throws IllegalArgumentException, IllegalAccessException;
      public native void setShort(Object obj, short s) throws IllegalArgumentException, IllegalAccessException;
      public String toString();  // Overrides Object.toString()
}
Returned By:
Class.getDeclaredField(), Class.getDeclaredFields(), Class.getField(), Class.getFields().

Java in a Nutshell Online Quick Reference for Java 1.1
Created by David Flanagan. Copyright © 1997 by O'Reilly & Associates.