Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

ArrayValue.java

00001 package gov.nasa.arc.ase.jpf.jvm.examine;
00002 
00003 import gov.nasa.arc.ase.jpf.*;
00004 import gov.nasa.arc.ase.jpf.jvm.*;
00005 
00006 public class ArrayValue extends ObjectValue {
00007 
00008   int arraySize = 0;
00009 
00010   public ArrayValue(int v, DynamicArea da) {
00011     super(v,da);
00012     if (v == -1)
00013       return;
00014     arraySize = da.arraylength(objectID);
00015   }  
00016   public ArrayValue(long v, DynamicArea da) {
00017     super(v,da);
00018     if (v == -1)
00019       return;
00020     arraySize = da.arraylength(objectID);
00021   }  
00022   public iValue getElementValue(int index) {
00023     long value = heap.getValue(objectID,index);
00024     return State.createValue(heap.getVariableType(objectID, index),
00025     value,
00026     heap);
00027   }  
00028   public int getSize() {
00029     return arraySize;
00030   }  
00031 }

Generated at Thu Feb 7 06:39:36 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001