|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.et.rat.val.CompositeValue
edu.utep.cs.et.rat.val.ArrayValue
public class ArrayValue
A class to represent an array value. An array value is represented
as a tuple of a type, (Class) and the
elements (an array of Denotables). An element may be another array
value. If the type is null, the array is assumed to be an element
of another array.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.utep.cs.et.rat.val.CompositeValue |
|---|
CompositeValue.SimpleVarGenerator |
| Field Summary | |
|---|---|
private Object |
array
The Java array object represented by this array value. |
| Constructor Summary | |
|---|---|
ArrayValue(Class type,
Denotable[] elems)
Creates an array of the given type and elements. |
|
| Method Summary | |
|---|---|
static void |
assign(Object array,
int i,
Denotable elem)
Retrieves the Java value represented by the given Denotable, elem, and assigns it to the i-th element of the
given array, array. |
private Object |
buildJavaArray(Denotable[] values)
Builds and returns a Java array denoted by the given array of Denotable's. |
String |
code()
Returns a textual representation of the object denoted by this constructor call. |
String[] |
code(VarGenerator varGen)
Returns Java source code that, if evaluated, constructs a Java array object represented by this value. |
String |
toString()
Returns a string representation of this array. |
Class |
type()
Returns the type of this array. |
Object |
value()
Returns the Java array represented by this array. |
| Methods inherited from class edu.utep.cs.et.rat.val.CompositeValue |
|---|
elems, getTypeName, hasEquals, isEquivalentTo, isNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Object array
Denotables.
| Constructor Detail |
|---|
public ArrayValue(Class type,
Denotable[] elems)
| Method Detail |
|---|
private Object buildJavaArray(Denotable[] values)
public static void assign(Object array,
int i,
Denotable elem)
elem, and assigns it to the i-th element of the
given array, array.
public Class type()
type in interface Denotabletype in class CompositeValuepublic Object value()
public String toString()
toString in interface DenotabletoString in class Objectpublic String code()
x where:
T1 x1 = ...;
...
Tn xn = ...;
T x = new T[] {x1, ..., xn}
code(VarGenerator)public String[] code(VarGenerator varGen)
T1 x1 = ...;
...
Tn xn = ...;
T x = new T[] {x1, ..., xn}
The second element gives the name of the variable (e.g.,
x) that contains the constructed array object.
code in class CompositeValuecode(VarGenerator)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||