Class ClassGenerator
java.lang.Object
bsh.ClassGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateClass(String name, Modifiers modifiers, Class[] interfaces, Class superClass, bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) Parse the BSHBlock for the class definition and generate the class.static ClassgenerateClassImpl(String name, Modifiers modifiers, Class[] interfaces, Class superClass, bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) Parse the BSHBlock for for the class definition and generate the class using ClassGenerator.static ClassGeneratorinvokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) Invoke a super.method() style superclass method on an object instance.static ObjectinvokeSuperclassMethodImpl(BshClassManager bcm, Object instance, String methodName, Object[] args) voidsetInstanceNameSpaceParent(Object instance, String className, NameSpace parent) Change the parent of the class instance namespace.
-
Constructor Details
-
ClassGenerator
public ClassGenerator()
-
-
Method Details
-
getClassGenerator
-
generateClass
-
invokeSuperclassMethod
public Object invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, bsh.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.- Throws:
UtilEvalErrorbsh.ReflectErrorInvocationTargetException
-
setInstanceNameSpaceParent
-
generateClassImpl
public static Class generateClassImpl(String name, Modifiers modifiers, Class[] interfaces, Class superClass, bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) throws EvalError Parse the BSHBlock for for the class definition and generate the class using ClassGenerator.- Throws:
EvalError
-
invokeSuperclassMethodImpl
public static Object invokeSuperclassMethodImpl(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, bsh.ReflectError, InvocationTargetException - Throws:
UtilEvalErrorbsh.ReflectErrorInvocationTargetException
-