Groovy 2.2.1

org.codehaus.groovy.classgen
[Java] Class EnumCompletionVisitor

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

public class EnumCompletionVisitor
extends ClassCodeVisitorSupport

Enums have a parent constructor with two arguments from java.lang.Enum. This visitor adds those two arguments into manually created constructors and performs the necessary super call.


Constructor Summary
EnumCompletionVisitor(CompilationUnit cu, SourceUnit su)

 
Method Summary
static void addMapConstructors(ClassNode enumClass, boolean hasNoArg)

protected SourceUnit getSourceUnit()

void visitClass(ClassNode node)

 
Methods inherited from class ClassCodeVisitorSupport
visitMethod, visitField, visitReturnStatement, visitProperty, visitConstructor, visitClass, visitPackage, visitBlockStatement, visitDoWhileLoop, visitExpressionStatement, visitForLoop, visitSwitch, visitWhileLoop, visitDeclarationExpression, visitImports, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitAnnotations, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitClassExpression, visitPropertyExpression, visitListExpression, visitConstantExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class CodeVisitorSupport
visitReturnStatement, visitClassExpression, visitPropertyExpression, visitListExpression, visitConstantExpression, visitBlockStatement, visitDoWhileLoop, visitExpressionStatement, visitForLoop, visitSwitch, visitWhileLoop, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

EnumCompletionVisitor

public EnumCompletionVisitor(CompilationUnit cu, SourceUnit su)


 
Method Detail

addMapConstructors

public static void addMapConstructors(ClassNode enumClass, boolean hasNoArg)


getSourceUnit

protected SourceUnit getSourceUnit()


visitClass

public void visitClass(ClassNode node)


 

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