Top Description Fields Constructors Methods
bsh

pack-priv Class BSHVariableDeclarator

extends SimpleNode
Class Inheritance

name [ = initializer ] evaluate name and return optional initializer

Field Summary

Modifier and TypeField and Description
public String
Inherited from bsh.SimpleNode:
childrenfirstTokenidJAVACODElastTokenparentsourceFile

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
eval(BSHType
is the BSHType node. Its info is passed through to any variable intializer children for the case where the array initializer does not declare the type explicitly. e.g. int [] a = { 1, 2 }; typeNode may be null to indicate no type information available.
typeNode
,
CallStack callstack, Interpreter interpreter)

Evaluate the optional initializer value.

public String
toString()

Overrides bsh.SimpleNode.toString.

Returns a string representation of the object.
Inherited from bsh.SimpleNode:
dumpevalgetChildgetLineNumbergetSourceFilegetTextjjtAddChildjjtClosejjtGetChildjjtGetNumChildrenjjtGetParentjjtOpenjjtSetParentprunesetSourceFiletoString

Field Detail

nameback to summary
public String name

Constructor Detail

BSHVariableDeclaratorback to summary
pack-priv BSHVariableDeclarator(int id)

Method Detail

evalback to summary
public Object eval(BSHType typeNode, CallStack callstack, Interpreter interpreter) throws EvalError

Evaluate the optional initializer value. (The name was set at parse time.) A variable declarator can be evaluated with or without preceding type information. Currently the type info is only used by array initializers in the case where there is no explicitly declared type.

Parameters
typeNode:BSHType

is the BSHType node. Its info is passed through to any variable intializer children for the case where the array initializer does not declare the type explicitly. e.g. int [] a = { 1, 2 }; typeNode may be null to indicate no type information available.

toStringback to summary
public String toString()

Overrides bsh.SimpleNode.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.