JML

java.lang.reflect
Class Field

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

public final class Field
extends AccessibleObject
implements Member


Class Specifications

Specifications inherited from class Object
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this);

Model Field Summary
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
 
Fields inherited from class java.lang.reflect.AccessibleObject
override, securityCheckCache
 
Fields inherited from interface java.lang.reflect.Member
DECLARED, PUBLIC
 
Constructor Summary
(package private) Field(non_null Class declaringClass, non_null String name, non_null Class type, int modifiers, int slot)
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
(package private)  Field copy()
           
 boolean equals(nullable Object obj)
           
 Object get(non_null Object obj)
           
 boolean getBoolean(non_null Object obj)
           
 byte getByte(non_null Object obj)
           
 char getChar(non_null Object obj)
           
 Class getDeclaringClass()
           
 double getDouble(non_null Object obj)
           
 float getFloat(non_null Object obj)
           
 int getInt(non_null Object obj)
           
 long getLong(non_null Object obj)
           
 int getModifiers()
           
 String getName()
           
 short getShort(non_null Object obj)
           
 Class getType()
           
(package private) static String getTypeName(non_null Class type)
           
 int hashCode()
           
 void set(non_null Object obj, non_null Object value)
           
 void setBoolean(non_null Object obj, boolean z)
           
 void setByte(non_null Object obj, byte b)
           
 void setChar(non_null Object obj, char c)
           
 void setDouble(non_null Object obj, double d)
           
 void setFloat(non_null Object obj, float f)
           
 void setInt(non_null Object obj, int i)
           
 void setLong(non_null Object obj, long l)
           
 void setShort(non_null Object obj, short s)
           
 String toString()
           
 
Methods inherited from class java.lang.reflect.AccessibleObject
isAccessible, setAccessible, setAccessible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

Field(non_null Class declaringClass,
      non_null String name,
      non_null Class type,
      int modifiers,
      int slot)
Method Detail

copy

Field copy()
Specifications: non_null

getDeclaringClass

public Class getDeclaringClass()
Specified by:
getDeclaringClass in interface Member
Specifications: pure non_null

getName

public String getName()
Specified by:
getName in interface Member
Specifications: pure non_null

getModifiers

public int getModifiers()
Specified by:
getModifiers in interface Member
Specifications: pure

getType

public Class getType()
Specifications: pure non_null

equals

public boolean equals(nullable Object obj)
Overrides:
equals in class Object
Specifications: pure
Specifications inherited from overridden method equals(Object obj) in class Object:
       pure
public normal_behavior
requires obj != null;
ensures (* \result is true when obj is "equal to" this object *);
     also
public normal_behavior
requires this == obj;
ensures \result ;
     also
public code normal_behavior
requires obj != null;
ensures \result <==> this == obj;
     also
diverges false;
ensures obj == null ==> !\result ;

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Specifications: pure
Specifications inherited from overridden method in class Object:
public behavior
assignable objectState;
ensures (* \result is a hash code for this object *);
     also
public code normal_behavior
assignable \nothing;

toString

public String toString()
Overrides:
toString in class Object
Specifications: pure non_null
Specifications inherited from overridden method in class Object:
       non_null
public normal_behavior
assignable objectState;
ensures \result != null;
ensures \result == this.theString;
ensures (* \result is a string representation of this object *);
     also
public code normal_behavior
assignable \nothing;
ensures \result != null&&(* \result is the instance's class name, followed by an @, followed by the instance's hashcode in hex *);
     also
public code model_program { ... }
    implies_that
assignable objectState;
ensures \result != null;

get

public Object get(non_null Object obj)
           throws IllegalArgumentException,
                  IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure non_null

getBoolean

public boolean getBoolean(non_null Object obj)
                   throws IllegalArgumentException,
                          IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getByte

public byte getByte(non_null Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getChar

public char getChar(non_null Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getShort

public short getShort(non_null Object obj)
               throws IllegalArgumentException,
                      IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getInt

public int getInt(non_null Object obj)
           throws IllegalArgumentException,
                  IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getLong

public long getLong(non_null Object obj)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getFloat

public float getFloat(non_null Object obj)
               throws IllegalArgumentException,
                      IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

getDouble

public double getDouble(non_null Object obj)
                 throws IllegalArgumentException,
                        IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException
Specifications: pure

set

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

setBoolean

public void setBoolean(non_null Object obj,
                       boolean z)
                throws IllegalArgumentException,
                       IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setByte

public void setByte(non_null Object obj,
                    byte b)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setChar

public void setChar(non_null Object obj,
                    char c)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setShort

public void setShort(non_null Object obj,
                     short s)
              throws IllegalArgumentException,
                     IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setInt

public void setInt(non_null Object obj,
                   int i)
            throws IllegalArgumentException,
                   IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setLong

public void setLong(non_null Object obj,
                    long l)
             throws IllegalArgumentException,
                    IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setFloat

public void setFloat(non_null Object obj,
                     float f)
              throws IllegalArgumentException,
                     IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

setDouble

public void setDouble(non_null Object obj,
                      double d)
               throws IllegalArgumentException,
                      IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

getTypeName

static String getTypeName(non_null Class type)
Specifications: pure non_null

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.