# Class ClassGeneratorImpl

java.lang.Object
bsh.ClassGenerator
bsh.ClassGeneratorImpl

public class ClassGeneratorImpl extends ClassGenerator

Author:
  Pat Niemeyer (pat@pat.net)

## Constructor Summary

Constructors
Constructor
Description
`ClassGeneratorImpl()`

## Method Summary

Modifier and Type
Method
Description
`Class`
`generateClass(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 Class`
`generateClassImpl(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.
`Object`
`invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args)`
Invoke a super.method() style superclass method on an object instance.
`static Object`
`invokeSuperclassMethodImpl(BshClassManager bcm, Object instance, String methodName, Object[] args)`
`void`
`setInstanceNameSpaceParent(Object instance, String className, NameSpace parent)`
Change the parent of the class instance namespace.

### Methods inherited from class ClassGenerator

`getClassGenerator`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ClassGeneratorImpl

public ClassGeneratorImpl()

## Method Details

### generateClass

public Class generateClass(String name, Modifiers modifiers, Class[] interfaces, Class superClass, bsh.BSHBlock block, boolean isInterface, CallStack callstack, Interpreter interpreter) throws EvalError
Description copied from class: `ClassGenerator`
Parse the BSHBlock for the class definition and generate the class.

Specified by:
  `generateClass` in class `ClassGenerator`
Throws:
  `EvalError`

### invokeSuperclassMethod

public Object invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, bsh.ReflectError, InvocationTargetException
Description copied from class: `ClassGenerator`
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.

Specified by:
  `invokeSuperclassMethod` in class `ClassGenerator`
Throws:
  `UtilEvalError`
  `bsh.ReflectError`
  `InvocationTargetException`

### setInstanceNameSpaceParent

public 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.

Specified by:
  `setInstanceNameSpaceParent` in class `ClassGenerator`

### 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:
  `UtilEvalError`
  `bsh.ReflectError`
  `InvocationTargetException`