Top Fields Constructors Methods
bsh

public abstract Class ClassGenerator

extends Object
Class Inheritance
Known Direct Subclasses
bsh.ClassGeneratorImpl
Imports
bsh.Capabilities.Unavailable, java.lang.reflect.InvocationTargetException

Field Summary

Modifier and TypeField and Description
private static ClassGenerator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Class<T>
generateClass(String name, Modifiers modifiers, Class<T>[] interfaces, Class<T> superClass, BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter)

Parse the BSHBlock for the class definition and generate the class.

public static ClassGenerator
public abstract Object
invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args)

Invoke a super.method() style superclass method on an object instance.

public abstract void
setInstanceNameSpaceParent(Object instance, String className, NameSpace parent)

Change the parent of the class instance namespace.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cgback to summary
private static ClassGenerator cg

Constructor Detail

ClassGeneratorback to summary
public ClassGenerator()

Method Detail

generateClassback to summary
public abstract Class<T> generateClass(String name, Modifiers modifiers, Class<T>[] interfaces, Class<T> superClass, BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) throws EvalError

Parse the BSHBlock for the class definition and generate the class.

getClassGeneratorback to summary
public static ClassGenerator getClassGenerator() throws UtilEvalError
invokeSuperclassMethodback to summary
public abstract Object invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, ReflectError, InvocationTargetException

Invoke a super.method() style superclass method on an object instance. This is not a normal function of the Java reflection API and is provided by generated class accessor methods.

setInstanceNameSpaceParentback to summary
public abstract void setInstanceNameSpaceParent(Object instance, String className, NameSpace parent)

Change the parent of the class instance namespace. This is currently used for inner class support.

Note

This method will likely be removed in the future.