java.lang.Object
org.gjt.sp.jedit.bsh.ClassGenerator
org.gjt.sp.jedit.bsh.ClassGeneratorImpl
- Author:
- Pat Niemeyer (pat@pat.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateClass(String name, Modifiers modifiers, Class[] interfaces, Class superClass, org.gjt.sp.jedit.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, org.gjt.sp.jedit.bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) Parse the BSHBlock for for the class definition and generate the class using ClassGenerator.invokeSuperclassMethod(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.Methods inherited from class org.gjt.sp.jedit.bsh.ClassGenerator
getClassGenerator
-
Constructor Details
-
ClassGeneratorImpl
public ClassGeneratorImpl()
-
-
Method Details
-
generateClass
public Class generateClass(String name, Modifiers modifiers, Class[] interfaces, Class superClass, org.gjt.sp.jedit.bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) throws EvalError Description copied from class:ClassGeneratorParse the BSHBlock for the class definition and generate the class.- Specified by:
generateClassin classClassGenerator- Throws:
EvalError
-
invokeSuperclassMethod
public Object invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, org.gjt.sp.jedit.bsh.ReflectError, InvocationTargetException Description copied from class:ClassGeneratorInvoke 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.- Specified by:
invokeSuperclassMethodin classClassGenerator- Throws:
UtilEvalErrororg.gjt.sp.jedit.bsh.ReflectErrorInvocationTargetException
-
setInstanceNameSpaceParent
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.- Specified by:
setInstanceNameSpaceParentin classClassGenerator
-
generateClassImpl
public static Class generateClassImpl(String name, Modifiers modifiers, Class[] interfaces, Class superClass, org.gjt.sp.jedit.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, org.gjt.sp.jedit.bsh.ReflectError, InvocationTargetException - Throws:
UtilEvalErrororg.gjt.sp.jedit.bsh.ReflectErrorInvocationTargetException
-