## org.codehaus.groovy.classgen
Class AsmClassGenerator

Generates Java class versions of Groovy classes using ASM.

author:
  James Strachan

author:
  Bing Ran

author:
  Jochen Theodorou

author:
  Alex Popescu

version:
  $Revision: 12045 $

Field Summary
`boolean` | `ASM_DEBUG`
`boolean` | `CREATE_DEBUG_INFO`
`boolean` | `CREATE_LINE_NUMBER_INFO`
`boolean` | `MARK_START`
`MethodCaller` | `asTypeMethod`
`MethodCaller` | `assertFailedMethod`
`MethodCaller` | `bitwiseNegate`
`MethodCaller` | `castToTypeMethod`
`ClassNode` | `classNode`
`int` | `columnNumber`
`MethodCaller` | `compareEqualMethod`
`MethodCaller` | `compareGreaterThanEqualMethod`
`MethodCaller` | `compareGreaterThanMethod`
`MethodCaller` | `compareIdenticalMethod`
`MethodCaller` | `compareLessThanEqualMethod`
`MethodCaller` | `compareLessThanMethod`
`MethodCaller` | `compareNotEqualMethod`
`MethodCaller` | `compareToMethod`
`CompileStack` | `compileStack`
`ConstructorNode` | `constructorNode`
`GeneratorContext` | `context`
`MethodCaller` | `createGroovyObjectWrapperMethod`
`MethodCaller` | `createListMethod`
`MethodCaller` | `createMapMethod`
`MethodCaller` | `createPojoWrapperMethod`
`MethodCaller` | `createRangeMethod`
`MethodCaller` | `createTupleMethod`
`ASTNode` | `currentASTNode`
`ClassVisitor` | `cv`
`MethodCaller` | `despreadList`
`ClassWriter` | `dummyClassWriter`
`DummyClassGenerator` | `dummyGen`
`List` | `exceptionBlocks`
`MethodCaller` | `findRegexMethod`
`Map` | `genericParameterNames`
`MethodCallerMultiAdapter` | `getField`
`MethodCallerMultiAdapter` | `getFieldOnSuper`
`MethodCallerMultiAdapter` | `getGroovyObjectField`
`MethodCallerMultiAdapter` | `getGroovyObjectProperty`
`MethodCaller` | `getMethodPointer`
`MethodCallerMultiAdapter` | `getProperty`
`MethodCallerMultiAdapter` | `getPropertyOnSuper`
`BytecodeHelper` | `helper`
`boolean` | `implicitThis`
`ClassNode` | `interfaceClassLoadingClass`
`String` | `internalBaseClassName`
`String` | `internalClassName`
`MethodCaller` | `invokeClosureMethod`
`MethodCallerMultiAdapter` | `invokeMethod`
`MethodCallerMultiAdapter` | `invokeMethodOnCurrent`
`MethodCallerMultiAdapter` | `invokeMethodOnSuper`
`MethodCallerMultiAdapter` | `invokeNew`
`MethodCallerMultiAdapter` | `invokeStaticMethod`
`MethodCaller` | `isCaseMethod`
`MethodCaller` | `iteratorHasNextMethod`
`MethodCaller` | `iteratorNextMethod`
`boolean` | `leftHandExpression`
`int` | `lineNumber`
`MethodCaller` | `matchRegexMethod`
`MethodNode` | `methodNode`
`MethodVisitor` | `mv`
`ClassNode` | `outermostClass`
`boolean` | `outputReturn`
`boolean` | `passingClosureParams`
`MethodCaller` | `regexPattern`
`ClassNode` | `rightHandType`
`MethodCaller` | `selectConstructorAndTransformArguments`
`MethodCallerMultiAdapter` | `setField`
`MethodCallerMultiAdapter` | `setFieldOnSuper`
`MethodCallerMultiAdapter` | `setGroovyObjectField`
`MethodCallerMultiAdapter` | `setGroovyObjectProperty`
`MethodCallerMultiAdapter` | `setProperty`
`MethodCallerMultiAdapter` | `setPropertyOnSuper`
`String` | `sourceFile`
`MethodCaller` | `spreadMap`
`Set` | `syntheticStaticFields`
`MethodCaller` | `unaryMinus`
`MethodCaller` | `unaryPlus`

Constructor Summary
`AsmClassGenerator(GeneratorContext context, ClassVisitor classVisitor, ClassLoader classLoader, String sourceFile)` maps the variable names to the JVM indices

Method Summary
`def` | `buildExceptions(def exceptions)`
`void` | `createMopMethods()`
`SourceUnit` | `getSourceUnit()`
`void` | `visitClass(ClassNode classNode)`
`void` | `visitGenericType(GenericsType genericsType)`
`void` | `visitMopMethodList(List methods, boolean isThis)` filters a list of method for MOP methods.

Constructor Detail

### AsmClassGenerator

    public AsmClassGenerator(GeneratorContext context, ClassVisitor classVisitor, ClassLoader classLoader, String sourceFile)

  maps the variable names to the JVM indices

Method Detail

### buildExceptions

    def buildExceptions(def exceptions)

### createMopMethods

    void createMopMethods()

### getSourceUnit

    SourceUnit getSourceUnit()

### visitClass

    public void visitClass(ClassNode classNode)

### visitGenericType

    public void visitGenericType(GenericsType genericsType)

### visitMopMethodList

    void visitMopMethodList(List methods, boolean isThis)

  filters a list of method for MOP methods. For all methods that are no MOP methods a MOP method is created if the method is not public and the call would be a call on "this" (isThis == true). If the call is not on "this", then the call is a call on "super" and all methods are used, unless they are already a MOP method
  param:
    methods unfiltered list of methods for MOP
  param:
    isThis if true, then we are creating a MOP method on "this", "super" else
  see:
    #generateMopCalls(java.util.LinkedList, boolean)