Top Fields Constructors Methods
bsh

pack-priv Class BSHType

extends SimpleNode
implements Listener
Class Inheritance
All Implemented Interfaces
bsh.BshClassManager.Listener
Imports
java.lang.reflect.Array

Field Summary

Modifier and TypeField and Description
private int
arrayDims

If we are an array type this will be non zero and indicate the dimensionality of the array.

private Class<T>
baseType

baseType is used during evaluation of full type and retained for the case where we are an array type.

pack-priv String
private Class<T>
type

Internal cache of the type.

Inherited from bsh.SimpleNode:
childrenfirstTokenidJAVACODElastTokenparentsourceFile

Constructor Summary

AccessConstructor and Description
pack-priv
BSHType(int id)

Method Summary

Modifier and TypeMethod and Description
public void
addArrayDimension()

Used by the grammar to indicate dimensions of array types during parsing.

public void
public int
getArrayDims()

If we are an array type this will be non zero and indicate the dimensionality of the array.

public Class<T>
getBaseType()

baseType is used during evaluation of full type and retained for the case where we are an array type.

public Class<T>
getType(CallStack callstack, Interpreter interpreter)

public String
getTypeDescriptor(CallStack callstack, Interpreter interpreter, String defaultPackage)

Returns a class descriptor for this type.

public static String
pack-priv SimpleNode
Inherited from bsh.SimpleNode:
dumpevalgetChildgetLineNumbergetSourceFilegetTextjjtAddChildjjtClosejjtGetChildjjtGetNumChildrenjjtGetParentjjtOpenjjtSetParentprunesetSourceFiletoStringtoString

Field Detail

arrayDimsback to summary
private int arrayDims

If we are an array type this will be non zero and indicate the dimensionality of the array. e.g. 2 for String[][];

baseTypeback to summary
private Class<T> baseType

baseType is used during evaluation of full type and retained for the case where we are an array type. In the case where we are not an array this will be the same as type.

descriptorback to summary
pack-priv String descriptor
typeback to summary
private Class<T> type

Internal cache of the type. Cleared on classloader change.

Constructor Detail

BSHTypeback to summary
pack-priv BSHType(int id)

Method Detail

addArrayDimensionback to summary
public void addArrayDimension()

Used by the grammar to indicate dimensions of array types during parsing.

classLoaderChangedback to summary
public void classLoaderChanged()

Implements bsh.BshClassManager.Listener.classLoaderChanged.

getArrayDimsback to summary
public int getArrayDims()

If we are an array type this will be non zero and indicate the dimensionality of the array. e.g. 2 for String[][];

getBaseTypeback to summary
public Class<T> getBaseType()

baseType is used during evaluation of full type and retained for the case where we are an array type. In the case where we are not an array this will be the same as type.

getTypeback to summary
public Class<T> getType(CallStack callstack, Interpreter interpreter) throws EvalError
getTypeDescriptorback to summary
public String getTypeDescriptor(CallStack callstack, Interpreter interpreter, String defaultPackage)

Returns a class descriptor for this type. If the type is an ambiguous name (object type) evaluation is attempted through the namespace in order to resolve imports. If it is not found and the name is non-compound we assume the default package for the name.

getTypeDescriptorback to summary
public static String getTypeDescriptor(Class<T> clas)
getTypeNodeback to summary
pack-priv SimpleNode getTypeNode()