Top Description Fields Constructors Methods
bsh

pack-priv Class BSHArrayDimensions

extends SimpleNode
Class Inheritance
Imports
java.lang.reflect.Array

The name of this class is somewhat misleading. This covers both the case where there is an array initializer and

Field Summary

Modifier and TypeField and Description
public Class<T>
public int[]
definedDimensions

The Length in each defined dimension.

public int
public int
Inherited from bsh.SimpleNode:
childrenfirstTokenidJAVACODElastTokenparentsourceFile

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
public void
public Object
eval(Class<T> type, CallStack callstack, Interpreter interpreter)

public Object
eval(CallStack callstack, Interpreter interpreter)

Overrides bsh.SimpleNode.eval.

Evaluate the structure of the array in one of two ways: a) an initializer exists, evaluate it and return the fully constructed array object, also record the dimensions of that array b) evaluate and record the lengths in each dimension and return void.
Inherited from bsh.SimpleNode:
dumpgetChildgetLineNumbergetSourceFilegetTextjjtAddChildjjtClosejjtGetChildjjtGetNumChildrenjjtGetParentjjtOpenjjtSetParentprunesetSourceFiletoStringtoString

Field Detail

baseTypeback to summary
public Class<T> baseType
definedDimensionsback to summary
public int[] definedDimensions

The Length in each defined dimension. This value set by the eval() Since the values can come from Expressions we should be re-eval()d each time.

numDefinedDimsback to summary
public int numDefinedDims
numUndefinedDimsback to summary
public int numUndefinedDims

Constructor Detail

BSHArrayDimensionsback to summary
pack-priv BSHArrayDimensions(int id)

Method Detail

addDefinedDimensionback to summary
public void addDefinedDimension()
addUndefinedDimensionback to summary
public void addUndefinedDimension()
evalback to summary
public Object eval(Class<T> type, CallStack callstack, Interpreter interpreter) throws EvalError
evalback to summary
public Object eval(CallStack callstack, Interpreter interpreter) throws EvalError

Overrides bsh.SimpleNode.eval.

Evaluate the structure of the array in one of two ways: a) an initializer exists, evaluate it and return the fully constructed array object, also record the dimensions of that array b) evaluate and record the lengths in each dimension and return void. The structure of the array dims is maintained in dimensions.