// @(#)$Id: Field.refines-spec 1287 2005-03-01 02:58:57Z cok $

// Copyright (C) 2001 Iowa State University

// This file is part of JML

// JML is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.

// JML is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with JML; see the file COPYING.  If not, write to
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

package java.lang.reflect;

// FIXME
public final
class Field extends AccessibleObject implements Member {

    //@ pure
    Field(Class declaringClass,
          String name,
          Class type,
          int modifiers,
          int slot);

    Field copy();

    public /*@ pure @*/ Class getDeclaringClass();

    public /*@ pure @*/ String getName();

    public /*@ pure @*/ int getModifiers();

    public /*@ pure @*/ Class getType();

    public /*@ pure @*/ boolean equals(Object obj);

    public /*@ pure @*/ int hashCode();

    public /*@ pure @*/ String toString();

    public /*@ pure @*/ Object get(Object obj)
        throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ boolean getBoolean(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ byte getByte(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ char getChar(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ short getShort(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ int getInt(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ long getLong(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ float getFloat(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public /*@ pure @*/ double getDouble(Object obj)
	throws IllegalArgumentException, IllegalAccessException;

    public void set(Object obj, Object value)
	throws IllegalArgumentException, IllegalAccessException;

    public void setBoolean(Object obj, boolean z)
	throws IllegalArgumentException, IllegalAccessException;

    public void setByte(Object obj, byte b)
	throws IllegalArgumentException, IllegalAccessException;

    public void setChar(Object obj, char c)
	throws IllegalArgumentException, IllegalAccessException;

    public void setShort(Object obj, short s)
	throws IllegalArgumentException, IllegalAccessException;

    public void setInt(Object obj, int i)
	throws IllegalArgumentException, IllegalAccessException;

    public void setLong(Object obj, long l)
	throws IllegalArgumentException, IllegalAccessException;

    public void setFloat(Object obj, float f)
	throws IllegalArgumentException, IllegalAccessException;

    public void setDouble(Object obj, double d)
	throws IllegalArgumentException, IllegalAccessException;

    static /*@ pure @*/ String getTypeName(Class type);

}
