Package org.codehaus.groovy.classgen
Class DummyClassGenerator
java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.classgen.ClassGenerator
org.codehaus.groovy.classgen.DummyClassGenerator
- All Implemented Interfaces:
GroovyClassVisitor
,GroovyCodeVisitor
,ErrorCollecting
To generate a class that has all the fields and methods, except that fields are not initialized
and methods are empty. It's intended for being used as a place holder during code generation
of reference to the "this" class itself.
-
Field Summary
Fields inherited from class org.codehaus.groovy.classgen.ClassGenerator
innerClasses
-
Constructor Summary
ConstructorDescriptionDummyClassGenerator
(GeneratorContext context, org.objectweb.asm.ClassVisitor classVisitor, ClassLoader classLoader, String sourceFile) -
Method Summary
Modifier and TypeMethodDescriptionprotected CompileUnit
void
void
visitClass
(ClassNode classNode) Visit a ClassNode.void
Visit a ConstructorNode.void
visitField
(FieldNode fieldNode) Visit a FieldNode.void
visitMethod
(MethodNode node) Visit a MethodNode.protected void
visitParameter
(ASTNode node, Parameter parameter) protected void
visitParameters
(ASTNode node, Parameter[] parameters) void
visitProperty
(PropertyNode statement) Visit a PropertyNode.Methods inherited from class org.codehaus.groovy.classgen.ClassGenerator
getInnerClasses, getSourceUnit, visitBytecodeSequence
Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport
addError, visitAnnotation, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClassCodeContainer, visitConstructorOrMethod, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitExpressionStatement, visitForLoop, visitIfElse, visitImports, visitObjectInitializerStatements, visitPackage, visitReturnStatement, visitStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop
Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport
afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitEmptyStatement, visitFieldExpression, visitGStringExpression, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.codehaus.groovy.ast.GroovyCodeVisitor
visit, visit, visitEmptyExpression, visitListOfExpressions
-
Constructor Details
-
DummyClassGenerator
public DummyClassGenerator(GeneratorContext context, org.objectweb.asm.ClassVisitor classVisitor, ClassLoader classLoader, String sourceFile)
-
-
Method Details
-
visitClass
Description copied from interface:GroovyClassVisitor
Visit a ClassNode.- Specified by:
visitClass
in interfaceGroovyClassVisitor
- Overrides:
visitClass
in classClassCodeVisitorSupport
-
visitConstructor
Description copied from interface:GroovyClassVisitor
Visit a ConstructorNode.- Specified by:
visitConstructor
in interfaceGroovyClassVisitor
- Overrides:
visitConstructor
in classClassCodeVisitorSupport
-
visitMethod
Description copied from interface:GroovyClassVisitor
Visit a MethodNode.- Specified by:
visitMethod
in interfaceGroovyClassVisitor
- Overrides:
visitMethod
in classClassCodeVisitorSupport
-
visitField
Description copied from interface:GroovyClassVisitor
Visit a FieldNode.- Specified by:
visitField
in interfaceGroovyClassVisitor
- Overrides:
visitField
in classClassCodeVisitorSupport
-
visitProperty
Description copied from interface:GroovyClassVisitor
Visit a PropertyNode.- Specified by:
visitProperty
in interfaceGroovyClassVisitor
- Overrides:
visitProperty
in classClassCodeVisitorSupport
-
visitAnnotations
- Overrides:
visitAnnotations
in classClassCodeVisitorSupport
-
visitParameters
-
visitParameter
-
getCompileUnit
-