Groovy 1.7.0

## org.codehaus.groovy.classgen
Class ClassGenerator

    java.lang.Object
      org.codehaus.groovy.ast.CodeVisitorSupport
          org.codehaus.groovy.ast.ClassCodeVisitorSupport
              org.codehaus.groovy.classgen.ClassGenerator

All Implemented Interfaces:
  org.objectweb.asm.Opcodes

    class ClassGenerator
    extends ClassCodeVisitorSupport

Abstract base class for generator of Java class versions of Groovy AST classes

author:
  James Strachan

author:
  Russel Winder

version:
  $Revision: 16963 $

Field Summary
`static int` | `asmJDKVersion` A constant that is the ASM representation of the JDK version number for use in the `ClassWriter.visitor` method calls.
`protected ClassLoader` | `classLoader`
`protected LinkedList` | `innerClasses`

Constructor Summary
`ClassGenerator(ClassLoader classLoader)`

Method Summary
`ClassLoader` | `getClassLoader()`
`LinkedList` | `getInnerClasses()`
`protected SourceUnit` | `getSourceUnit()`
`void` | `visitBytecodeSequence(BytecodeSequence bytecodeSequence)`

Methods inherited from class ClassCodeVisitorSupport

addError, getSourceUnit, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitConstructor, visitConstructorOrMethod, visitContinueStatement, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitImports, visitMethod, visitPackage, visitProperty, visitReturnStatement, visitStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitVariableExpression, visitWhileLoop

Methods inherited from class CodeVisitorSupport

visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitRegexExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### asmJDKVersion

    static final int asmJDKVersion

  A constant that is the ASM representation of the JDK version number for use in the `ClassWriter.visitor` method calls.

  Prior to version 1.5 of ASM, the code generated was always JDK1.3 compliant. As of ASM version 1.5 there is an extra (first) parameter to specify the bytecode version to generate. In version 1.5 these are in Constants. The CVS (as at 2004.12.12) and presumably in version 2.0, the interface Constants is replaced by Opcodes.

### classLoader

    protected ClassLoader classLoader

### innerClasses

    protected LinkedList innerClasses

Constructor Detail

### ClassGenerator

    public ClassGenerator(ClassLoader classLoader)

Method Detail

### getClassLoader

    public ClassLoader getClassLoader()

### getInnerClasses

    public LinkedList getInnerClasses()

### getSourceUnit

    protected SourceUnit getSourceUnit()

### visitBytecodeSequence

    public void visitBytecodeSequence(BytecodeSequence bytecodeSequence)

Copyright © 2003-2009 The Codehaus. All rights reserved.