| java.lang.Object gov.nasa.jpf.jvm.MJIEnv
MJIEnv | public class MJIEnv (Code) | | MJIEnv is the call environment for "native" methods, i.e. code that
is executed by the JVM, not by JPF.
Since library abstractions are supposed to be "user code", we provide
this class as a (little bit of) insulation towards the inner JPF workings.
There are two APIs exported by this class. The public methods (like
getStringObject) don't expose JPF internals, and can be used from non
gov.nasa.jpf.jvm NativePeer classes). The rest is package-default
and can be used to fiddle around as much as you like to (if you are in
the ..jvm package)
Note that MJIEnv objects are now per-ThreadInfo (i.e. the variable
call envionment only includes MethodInfo and ClassInfo), which means
MJIEnv can be used in non-native methods (but only carefully, if you
don't need mi or ci)
|
Method Summary | |
public boolean | canLock(int objref) | void | clearCallEnvironment() | public int | getArrayLength(int objref) | public String | getArrayType(int objref) | public int | getArrayTypeSize(int objref) | public boolean[] | getBooleanArrayObject(int objref) | public boolean | getBooleanField(int objref, String fname) | public boolean | getBooleanValue(int objref) | public byte[] | getByteArrayObject(int objref) | public byte | getByteField(int objref, String fname) | public byte | getByteValue(int objref) | public char | getCharArrayElement(int objref, int index) | public char[] | getCharArrayObject(int objref) | public char | getCharField(int objref, String fname) | public char | getCharValue(int objref) | ElementInfo | getClassElementInfo(int clsObjRef) | ClassInfo | getClassInfo() | ClassInfo | getClassInfo(int objref) | public String | getClassName(int objref) | public double[] | getDoubleArrayObject(int objref) | public double | getDoubleField(int objref, String fname) | public double | getDoubleValue(int objref) | DynamicArea | getDynamicArea() | ElementInfo | getElementInfo(int objref) | String | getException() | String | getExceptionDetails() | public float[] | getFloatArrayObject(int objref) | public float | getFloatField(int objref, String fname) | public float | getFloatValue(int objref) | public int | getIntArrayElement(int objref, int index) | public int[] | getIntArrayObject(int objref) | public int | getIntField(int objref, String fname) | public int | getIntField(int objref, String refType, String fname) | public int | getIntValue(int objref) | KernelState | getKernelState() | public long | getLongArrayElement(int objref, int index) | public long[] | getLongArrayObject(int objref) | public long | getLongField(int objref, String fname) | public long | getLongField(int objref, String refType, String fname) | public long | getLongValue(int objref) | MethodInfo | getMethodInfo() | public int | getReferenceArrayElement(int objref, int index) | public int | getReferenceField(int objref, String fname) | boolean | getRepeat() | public short[] | getShortArrayObject(int objref) | public short | getShortField(int objref, String fname) | public short | getShortValue(int objref) | int | getStateId() | StaticArea | getStaticArea() | public boolean | getStaticBooleanField(String clsName, String fname) | public byte | getStaticByteField(String clsName, String fname) | public char | getStaticCharField(String clsName, String fname) | public double | getStaticDoubleField(String clsName, String fname) | public float | getStaticFloatField(String clsName, String fname) | public int | getStaticIntField(String clsName, String fname) | public long | getStaticLongField(String clsName, String fname) | public int | getStaticObjectField(String clsName, String fname) | public short | getStaticShortField(String clsName, String fname) | public String | getStringObject(int objref) | SystemState | getSystemState() | ThreadInfo | getThreadInfo() | public String | getTypeName(int objref) | public JVM | getVM() | public boolean | isArray(int objref) | public boolean | isInstanceOf(int objref, String clsName) | void | lockNotified(int objref) | public int | newBooleanArray(int size) | public int | newByteArray(int size) | public int | newCharArray(int size) | public int | newDoubleArray(int size) | public int | newFloatArray(int size) | public int | newIntArray(int size) | public int | newLongArray(int size) | public int | newObject(String clsName) | public int | newObjectArray(String clsName, int size) | public int | newShortArray(int size) | public int | newString(String s) | public int | newString(int arrayRef) | public void | notify(int objref) | public void | notifyAll(int objref) | public void | repeatInvocation() | public void | setBooleanField(int objref, String fname, boolean val) | public void | setByteArrayElement(int objref, int index, byte value) | public void | setByteField(int objref, String fname, byte val) | void | setCallEnvironment(MethodInfo mi) | public void | setCharArrayElement(int objref, int index, char value) | public void | setCharField(int objref, String fname, char val) | public void | setDoubleField(int objref, String fname, double val) | public void | setFloatField(int objref, String fname, float val) | public void | setIntArrayElement(int objref, int index, int value) | public void | setIntField(int objref, String fname, int val) | public void | setIntField(int objref, String refType, String fname, int val) | public void | setLongArrayElement(int objref, int index, long value) | public void | setLongField(int objref, String fname, long val) | public void | setLongField(int objref, String refType, String fname, long val) | public void | setReferenceArrayElement(int objref, int index, int eRef) | public void | setReferenceField(int objref, String refType, String fname, int val) | public void | setReferenceField(int objref, String fname, int ref) | public void | setShortField(int objref, String fname, short val) | public void | setStaticBooleanField(String clsName, String fname, boolean value) | public void | setStaticByteField(String clsName, String fname, byte value) | public void | setStaticCharField(String clsName, String fname, char value) | public void | setStaticDoubleField(String clsName, String fname, double val) | public void | setStaticFloatField(String clsName, String fname, float value) | public void | setStaticIntField(String clsName, String fname, int value) | public void | setStaticIntField(int clsObjRef, String fname, int val) | public void | setStaticLongField(String clsName, String fname, long value) | public void | setStaticReferenceField(String clsName, String fname, int objref) | public void | throwException(String classname) | public void | throwException(String classname, String details) | public void | wait(int objref) |
NULL | final public static int NULL(Code) | | |
canLock | public boolean canLock(int objref)(Code) | | |
clearCallEnvironment | void clearCallEnvironment()(Code) | | |
getArrayLength | public int getArrayLength(int objref)(Code) | | |
getArrayTypeSize | public int getArrayTypeSize(int objref)(Code) | | |
getBooleanArrayObject | public boolean[] getBooleanArrayObject(int objref)(Code) | | |
getBooleanField | public boolean getBooleanField(int objref, String fname)(Code) | | |
getBooleanValue | public boolean getBooleanValue(int objref)(Code) | | |
getByteArrayObject | public byte[] getByteArrayObject(int objref)(Code) | | |
getByteField | public byte getByteField(int objref, String fname)(Code) | | |
getByteValue | public byte getByteValue(int objref)(Code) | | |
getCharArrayElement | public char getCharArrayElement(int objref, int index)(Code) | | |
getCharArrayObject | public char[] getCharArrayObject(int objref)(Code) | | |
getCharField | public char getCharField(int objref, String fname)(Code) | | |
getCharValue | public char getCharValue(int objref)(Code) | | |
getDoubleArrayObject | public double[] getDoubleArrayObject(int objref)(Code) | | |
getDoubleField | public double getDoubleField(int objref, String fname)(Code) | | |
getDoubleValue | public double getDoubleValue(int objref)(Code) | | |
getFloatArrayObject | public float[] getFloatArrayObject(int objref)(Code) | | |
getFloatField | public float getFloatField(int objref, String fname)(Code) | | |
getFloatValue | public float getFloatValue(int objref)(Code) | | |
getIntArrayElement | public int getIntArrayElement(int objref, int index)(Code) | | |
getIntArrayObject | public int[] getIntArrayObject(int objref)(Code) | | |
getIntField | public int getIntField(int objref, String fname)(Code) | | |
getIntValue | public int getIntValue(int objref)(Code) | | |
getLongArrayElement | public long getLongArrayElement(int objref, int index)(Code) | | |
getLongArrayObject | public long[] getLongArrayObject(int objref)(Code) | | |
getLongField | public long getLongField(int objref, String fname)(Code) | | |
getLongValue | public long getLongValue(int objref)(Code) | | |
getReferenceArrayElement | public int getReferenceArrayElement(int objref, int index)(Code) | | |
getReferenceField | public int getReferenceField(int objref, String fname)(Code) | | |
getRepeat | boolean getRepeat()(Code) | | |
getShortArrayObject | public short[] getShortArrayObject(int objref)(Code) | | |
getShortField | public short getShortField(int objref, String fname)(Code) | | |
getShortValue | public short getShortValue(int objref)(Code) | | |
getStateId | int getStateId()(Code) | | |
getStaticBooleanField | public boolean getStaticBooleanField(String clsName, String fname)(Code) | | |
getStaticDoubleField | public double getStaticDoubleField(String clsName, String fname)(Code) | | |
getStringObject | public String getStringObject(int objref)(Code) | | turn JPF String object into a JVM String object
(this is a method available for non gov..jvm NativePeer classes)
|
isArray | public boolean isArray(int objref)(Code) | | |
isInstanceOf | public boolean isInstanceOf(int objref, String clsName)(Code) | | |
lockNotified | void lockNotified(int objref)(Code) | | |
newBooleanArray | public int newBooleanArray(int size)(Code) | | |
newByteArray | public int newByteArray(int size)(Code) | | |
newCharArray | public int newCharArray(int size)(Code) | | |
newDoubleArray | public int newDoubleArray(int size)(Code) | | |
newFloatArray | public int newFloatArray(int size)(Code) | | |
newIntArray | public int newIntArray(int size)(Code) | | |
newLongArray | public int newLongArray(int size)(Code) | | |
newObjectArray | public int newObjectArray(String clsName, int size)(Code) | | |
newShortArray | public int newShortArray(int size)(Code) | | |
newString | public int newString(int arrayRef)(Code) | | |
notify | public void notify(int objref)(Code) | | |
notifyAll | public void notifyAll(int objref)(Code) | | |
repeatInvocation | public void repeatInvocation()(Code) | | |
setBooleanField | public void setBooleanField(int objref, String fname, boolean val)(Code) | | |
setByteArrayElement | public void setByteArrayElement(int objref, int index, byte value)(Code) | | |
setByteField | public void setByteField(int objref, String fname, byte val)(Code) | | |
setCharArrayElement | public void setCharArrayElement(int objref, int index, char value)(Code) | | |
setCharField | public void setCharField(int objref, String fname, char val)(Code) | | |
setDoubleField | public void setDoubleField(int objref, String fname, double val)(Code) | | |
setFloatField | public void setFloatField(int objref, String fname, float val)(Code) | | |
setIntArrayElement | public void setIntArrayElement(int objref, int index, int value)(Code) | | |
setIntField | public void setIntField(int objref, String fname, int val)(Code) | | |
setIntField | public void setIntField(int objref, String refType, String fname, int val)(Code) | | |
setLongArrayElement | public void setLongArrayElement(int objref, int index, long value)(Code) | | |
setLongField | public void setLongField(int objref, String fname, long val)(Code) | | |
setLongField | public void setLongField(int objref, String refType, String fname, long val)(Code) | | |
setReferenceArrayElement | public void setReferenceArrayElement(int objref, int index, int eRef)(Code) | | |
setReferenceField | public void setReferenceField(int objref, String refType, String fname, int val)(Code) | | |
setReferenceField | public void setReferenceField(int objref, String fname, int ref)(Code) | | |
setShortField | public void setShortField(int objref, String fname, short val)(Code) | | |
setStaticBooleanField | public void setStaticBooleanField(String clsName, String fname, boolean value)(Code) | | |
setStaticByteField | public void setStaticByteField(String clsName, String fname, byte value)(Code) | | |
setStaticCharField | public void setStaticCharField(String clsName, String fname, char value)(Code) | | |
setStaticDoubleField | public void setStaticDoubleField(String clsName, String fname, double val)(Code) | | |
setStaticFloatField | public void setStaticFloatField(String clsName, String fname, float value)(Code) | | |
setStaticIntField | public void setStaticIntField(String clsName, String fname, int value)(Code) | | |
setStaticIntField | public void setStaticIntField(int clsObjRef, String fname, int val)(Code) | | |
setStaticLongField | public void setStaticLongField(String clsName, String fname, long value)(Code) | | |
setStaticReferenceField | public void setStaticReferenceField(String clsName, String fname, int objref)(Code) | | |
throwException | public void throwException(String classname)(Code) | | |
wait | public void wait(int objref)(Code) | | |
|
|