JML

java.lang.reflect
Class Array

java.lang.Object
  extended byjava.lang.reflect.Array

public final class Array
extends Object


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
 
Constructor Summary
Array()
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
static Object get(non_null Object Param0, int Param1)
           
static boolean getBoolean(non_null Object Param0, int Param1)
           
static byte getByte(non_null Object Param0, int Param1)
           
static char getChar(non_null Object Param0, int Param1)
           
static double getDouble(non_null Object Param0, int Param1)
           
static float getFloat(non_null Object Param0, int Param1)
           
static int getInt(non_null Object Param0, int Param1)
           
static int getLength(non_null Object Param0)
           
static long getLong(non_null Object Param0, int Param1)
           
static short getShort(non_null Object Param0, int Param1)
           
static Object newInstance(non_null Class Param0, int Param1)
           
static Object newInstance(non_null Class Param0, non_null int[] Param1)
           
static void set(non_null Object Param0, int Param1, non_null Object Param2)
           
static void setBoolean(non_null Object Param0, int Param1, boolean Param2)
           
static void setByte(non_null Object Param0, int Param1, byte Param2)
           
static void setChar(non_null Object Param0, int Param1, char Param2)
           
static void setDouble(non_null Object Param0, int Param1, double Param2)
           
static void setFloat(non_null Object Param0, int Param1, float Param2)
           
static void setInt(non_null Object Param0, int Param1, int Param2)
           
static void setLong(non_null Object Param0, int Param1, long Param2)
           
static void setShort(non_null Object Param0, int Param1, short Param2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Array

public Array()
Method Detail

getLength

public static int getLength(non_null Object Param0)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException
Specifications: pure
requires \elemtype(\typeof(Param0)) <: \type(java.lang.Object);
ensures \result == ((java.lang.Object[])Param0).length;
     also
requires \elemtype(\typeof(Param0)) == \type(int);
ensures \result == ((int[])Param0).length;
     also
requires \elemtype(\typeof(Param0)) == \type(byte);
ensures \result == ((byte[])Param0).length;

getByte

public static byte getByte(non_null Object Param0,
                           int Param1)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure
public behavior
requires true;
signals_only java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
signals (java.lang.ArrayIndexOutOfBoundsException) Param1 < 0||getLength(Param0) <= Param1;
     also
public behavior
requires 0 <= Param1&&Param1 < getLength(Param0);
{|
requires \elemtype(\typeof(Param0)) <: \type(java.lang.Object);
ensures false;
also
requires \elemtype(\typeof(Param0)) == \type(int);
ensures false;
also
requires \elemtype(\typeof(Param0)) == \type(byte);
ensures \result == ((byte[])Param0)[Param1];
|}

getChar

public static char getChar(non_null Object Param0,
                           int Param1)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

getDouble

public static double getDouble(non_null Object Param0,
                               int Param1)
                        throws IllegalArgumentException,
                               ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

getFloat

public static float getFloat(non_null Object Param0,
                             int Param1)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

getInt

public static int getInt(non_null Object Param0,
                         int Param1)
                  throws IllegalArgumentException,
                         ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure
public behavior
requires true;
signals_only java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
signals (java.lang.ArrayIndexOutOfBoundsException) Param1 < 0||getLength(Param0) <= Param1;
     also
public behavior
requires 0 <= Param1&&Param1 < getLength(Param0);
{|
requires \elemtype(\typeof(Param0)) <: \type(java.lang.Object);
ensures false;
also
requires \elemtype(\typeof(Param0)) == \type(int);
ensures \result == ((int[])Param0)[Param1];
also
requires \elemtype(\typeof(Param0)) == \type(byte);
ensures \result == ((byte[])Param0)[Param1];
|}

getLong

public static long getLong(non_null Object Param0,
                           int Param1)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

getShort

public static short getShort(non_null Object Param0,
                             int Param1)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

getBoolean

public static boolean getBoolean(non_null Object Param0,
                                 int Param1)
                          throws IllegalArgumentException,
                                 ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure

setByte

public static void setByte(non_null Object Param0,
                           int Param1,
                           byte Param2)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setChar

public static void setChar(non_null Object Param0,
                           int Param1,
                           char Param2)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setDouble

public static void setDouble(non_null Object Param0,
                             int Param1,
                             double Param2)
                      throws IllegalArgumentException,
                             ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setFloat

public static void setFloat(non_null Object Param0,
                            int Param1,
                            float Param2)
                     throws IllegalArgumentException,
                            ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setInt

public static void setInt(non_null Object Param0,
                          int Param1,
                          int Param2)
                   throws IllegalArgumentException,
                          ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setLong

public static void setLong(non_null Object Param0,
                           int Param1,
                           long Param2)
                    throws IllegalArgumentException,
                           ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setShort

public static void setShort(non_null Object Param0,
                            int Param1,
                            short Param2)
                     throws IllegalArgumentException,
                            ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

setBoolean

public static void setBoolean(non_null Object Param0,
                              int Param1,
                              boolean Param2)
                       throws IllegalArgumentException,
                              ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

newInstance

public static Object newInstance(non_null Class Param0,
                                 int Param1)
                          throws NegativeArraySizeException
Throws:
NegativeArraySizeException
Specifications: pure non_null

newInstance

public static Object newInstance(non_null Class Param0,
                                 non_null int[] Param1)
                          throws IllegalArgumentException,
                                 NegativeArraySizeException
Throws:
IllegalArgumentException
NegativeArraySizeException
Specifications: pure non_null

get

public static Object get(non_null Object Param0,
                         int Param1)
                  throws IllegalArgumentException,
                         ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException
Specifications: pure non_null
public behavior
requires true;
signals_only java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
signals (java.lang.ArrayIndexOutOfBoundsException) Param1 < 0||getLength(Param0) <= Param1;
     also
public behavior
requires 0 <= Param1&&Param1 < getLength(Param0);
{|
requires \elemtype(\typeof(Param0)) <: \type(java.lang.Object);
ensures \result == ((java.lang.Object[])Param0)[Param1];
also
requires \elemtype(\typeof(Param0)) == \type(int);
ensures \result != null;
ensures \result instanceof java.lang.Integer;
ensures ((java.lang.Integer)\result ).intValue() == ((int[])Param0)[Param1];
also
requires \elemtype(\typeof(Param0)) == \type(byte);
ensures \result != null;
ensures \result instanceof java.lang.Byte;
ensures ((java.lang.Byte)\result ).byteValue() == ((byte[])Param0)[Param1];
|}

set

public static void set(non_null Object Param0,
                       int Param1,
                       non_null Object Param2)
                throws IllegalArgumentException,
                       ArrayIndexOutOfBoundsException
Throws:
IllegalArgumentException
ArrayIndexOutOfBoundsException

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.