Package org.codehaus.groovy.classgen
Class ClassCompletionVerifier
- java.lang.Object
-
- org.codehaus.groovy.ast.CodeVisitorSupport
-
- org.codehaus.groovy.ast.ClassCodeVisitorSupport
-
- org.codehaus.groovy.classgen.ClassCompletionVerifier
-
- All Implemented Interfaces:
GroovyClassVisitor
,GroovyCodeVisitor
,ErrorCollecting
public class ClassCompletionVerifier extends ClassCodeVisitorSupport
Checks that a class satisfies various conditions including:- Incorrect class or method access modifiers
- No abstract methods appear in a non-abstract class
- Existence and correct visibility for inherited members
- Invalid attempts to override final members
-
-
Constructor Summary
Constructors Constructor Description ClassCompletionVerifier(SourceUnit source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassNode
getClassNode()
protected SourceUnit
getSourceUnit()
void
visitBinaryExpression(BinaryExpression expression)
void
visitCatchStatement(CatchStatement cs)
void
visitClass(ClassNode node)
Visit a ClassNode.void
visitConstantExpression(ConstantExpression expression)
void
visitConstructor(ConstructorNode node)
Visit a ConstructorNode.void
visitDeclarationExpression(DeclarationExpression expression)
void
visitField(FieldNode node)
Visit a FieldNode.void
visitGStringExpression(GStringExpression expression)
void
visitMethod(MethodNode node)
Visit a MethodNode.void
visitMethodCallExpression(MethodCallExpression mce)
void
visitProperty(PropertyNode node)
Visit a PropertyNode.-
Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport
addError, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitClassCodeContainer, visitConstructorOrMethod, visitContinueStatement, visitDoWhileLoop, visitExpressionStatement, visitForLoop, visitIfElse, visitImports, visitObjectInitializerStatements, visitPackage, visitReturnStatement, visitStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop
-
Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport
visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstructorCallExpression, visitEmptyStatement, visitFieldExpression, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression
-
-
-
-
Constructor Detail
-
ClassCompletionVerifier
public ClassCompletionVerifier(SourceUnit source)
-
-
Method Detail
-
getClassNode
public ClassNode getClassNode()
-
visitClass
public void visitClass(ClassNode node)
Description copied from interface:GroovyClassVisitor
Visit a ClassNode.- Specified by:
visitClass
in interfaceGroovyClassVisitor
- Overrides:
visitClass
in classClassCodeVisitorSupport
-
getSourceUnit
protected SourceUnit getSourceUnit()
- Specified by:
getSourceUnit
in classClassCodeVisitorSupport
-
visitMethod
public void visitMethod(MethodNode node)
Description copied from interface:GroovyClassVisitor
Visit a MethodNode.- Specified by:
visitMethod
in interfaceGroovyClassVisitor
- Overrides:
visitMethod
in classClassCodeVisitorSupport
-
visitField
public void visitField(FieldNode node)
Description copied from interface:GroovyClassVisitor
Visit a FieldNode.- Specified by:
visitField
in interfaceGroovyClassVisitor
- Overrides:
visitField
in classClassCodeVisitorSupport
-
visitProperty
public void visitProperty(PropertyNode node)
Description copied from interface:GroovyClassVisitor
Visit a PropertyNode.- Specified by:
visitProperty
in interfaceGroovyClassVisitor
- Overrides:
visitProperty
in classClassCodeVisitorSupport
-
visitBinaryExpression
public void visitBinaryExpression(BinaryExpression expression)
- Specified by:
visitBinaryExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitBinaryExpression
in classCodeVisitorSupport
-
visitConstructor
public void visitConstructor(ConstructorNode node)
Description copied from interface:GroovyClassVisitor
Visit a ConstructorNode.- Specified by:
visitConstructor
in interfaceGroovyClassVisitor
- Overrides:
visitConstructor
in classClassCodeVisitorSupport
-
visitCatchStatement
public void visitCatchStatement(CatchStatement cs)
- Specified by:
visitCatchStatement
in interfaceGroovyCodeVisitor
- Overrides:
visitCatchStatement
in classClassCodeVisitorSupport
-
visitMethodCallExpression
public void visitMethodCallExpression(MethodCallExpression mce)
- Specified by:
visitMethodCallExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitMethodCallExpression
in classCodeVisitorSupport
-
visitDeclarationExpression
public void visitDeclarationExpression(DeclarationExpression expression)
- Specified by:
visitDeclarationExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitDeclarationExpression
in classClassCodeVisitorSupport
-
visitConstantExpression
public void visitConstantExpression(ConstantExpression expression)
- Specified by:
visitConstantExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitConstantExpression
in classCodeVisitorSupport
-
visitGStringExpression
public void visitGStringExpression(GStringExpression expression)
- Specified by:
visitGStringExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitGStringExpression
in classCodeVisitorSupport
-
-