home *** CD-ROM | disk | FTP | other *** search
- package java.lang.reflect;
-
- public final class Field implements Member {
- private Class clazz;
- private int slot;
- private String name;
- private Class type;
-
- private Field() {
- }
-
- public Class getDeclaringClass() {
- return this.clazz;
- }
-
- public String getName() {
- return this.name;
- }
-
- public native int getModifiers();
-
- public Class getType() {
- return this.type;
- }
-
- public boolean equals(Object var1) {
- if (var1 != null && var1 instanceof Field) {
- Field var2 = (Field)var1;
- return this.getDeclaringClass() == var2.getDeclaringClass() && this.getName().equals(var2.getName()) && this.getType() == var2.getType();
- } else {
- return false;
- }
- }
-
- public int hashCode() {
- return this.getDeclaringClass().getName().hashCode() ^ this.getName().hashCode();
- }
-
- public String toString() {
- int var1 = this.getModifiers();
- return (var1 == 0 ? "" : Modifier.toString(var1) + " ") + getTypeName(this.getType()) + " " + getTypeName(this.getDeclaringClass()) + "." + this.getName();
- }
-
- public native Object get(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native boolean getBoolean(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native byte getByte(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native char getChar(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native short getShort(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native int getInt(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native long getLong(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native float getFloat(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native double getDouble(Object var1) throws IllegalArgumentException, IllegalAccessException;
-
- public native void set(Object var1, Object var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setBoolean(Object var1, boolean var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setByte(Object var1, byte var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setChar(Object var1, char var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setShort(Object var1, short var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setInt(Object var1, int var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setLong(Object var1, long var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setFloat(Object var1, float var2) throws IllegalArgumentException, IllegalAccessException;
-
- public native void setDouble(Object var1, double var2) throws IllegalArgumentException, IllegalAccessException;
-
- static String getTypeName(Class var0) {
- if (var0.isArray()) {
- try {
- Class var1 = var0;
-
- int var2;
- for(var2 = 0; var1.isArray(); var1 = var1.getComponentType()) {
- ++var2;
- }
-
- StringBuffer var3 = new StringBuffer();
- var3.append(var1.getName());
-
- for(int var4 = 0; var4 < var2; ++var4) {
- var3.append("[]");
- }
-
- return var3.toString();
- } catch (Throwable var5) {
- }
- }
-
- return var0.getName();
- }
- }
-