protected class SecureASTCustomizer.SecuringCodeVisitor extends Object implements GroovyCodeVisitor
GroovyCodeVisitor
interface instead of using the CodeVisitorSupport
class to make sure that future features of the language gets managed by this visitor. Thus,
adding a new feature would result in a compilation error if this visitor is not updated.Modifier | Constructor and Description |
---|---|
protected |
SecuringCodeVisitor() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitEmptyExpression, visitListOfExpressions
protected void assertStatementAuthorized(Statement statement) throws SecurityException
statement
- the statement to be checkedSecurityException
- if usage of this statement class is forbiddenprotected void assertExpressionAuthorized(Expression expression) throws SecurityException
expression
- the expression to be checkedSecurityException
- if usage of this expression class is forbiddenprotected void assertTokenAuthorized(Token token) throws SecurityException
token
- the token to be checkedSecurityException
- if usage of this token is forbiddenpublic void visitBlockStatement(BlockStatement block)
visitBlockStatement
in interface GroovyCodeVisitor
public void visitForLoop(ForStatement forLoop)
visitForLoop
in interface GroovyCodeVisitor
public void visitWhileLoop(WhileStatement loop)
visitWhileLoop
in interface GroovyCodeVisitor
public void visitDoWhileLoop(DoWhileStatement loop)
visitDoWhileLoop
in interface GroovyCodeVisitor
public void visitIfElse(IfStatement ifElse)
visitIfElse
in interface GroovyCodeVisitor
public void visitExpressionStatement(ExpressionStatement statement)
visitExpressionStatement
in interface GroovyCodeVisitor
public void visitReturnStatement(ReturnStatement statement)
visitReturnStatement
in interface GroovyCodeVisitor
public void visitAssertStatement(AssertStatement statement)
visitAssertStatement
in interface GroovyCodeVisitor
public void visitTryCatchFinally(TryCatchStatement statement)
visitTryCatchFinally
in interface GroovyCodeVisitor
public void visitEmptyStatement(EmptyStatement statement)
visitEmptyStatement
in interface GroovyCodeVisitor
public void visitSwitch(SwitchStatement statement)
visitSwitch
in interface GroovyCodeVisitor
public void visitCaseStatement(CaseStatement statement)
visitCaseStatement
in interface GroovyCodeVisitor
public void visitBreakStatement(BreakStatement statement)
visitBreakStatement
in interface GroovyCodeVisitor
public void visitContinueStatement(ContinueStatement statement)
visitContinueStatement
in interface GroovyCodeVisitor
public void visitThrowStatement(ThrowStatement statement)
visitThrowStatement
in interface GroovyCodeVisitor
public void visitSynchronizedStatement(SynchronizedStatement statement)
visitSynchronizedStatement
in interface GroovyCodeVisitor
public void visitCatchStatement(CatchStatement statement)
visitCatchStatement
in interface GroovyCodeVisitor
public void visitMethodCallExpression(MethodCallExpression call)
visitMethodCallExpression
in interface GroovyCodeVisitor
public void visitStaticMethodCallExpression(StaticMethodCallExpression call)
visitStaticMethodCallExpression
in interface GroovyCodeVisitor
public void visitConstructorCallExpression(ConstructorCallExpression call)
visitConstructorCallExpression
in interface GroovyCodeVisitor
public void visitTernaryExpression(TernaryExpression expression)
visitTernaryExpression
in interface GroovyCodeVisitor
public void visitShortTernaryExpression(ElvisOperatorExpression expression)
visitShortTernaryExpression
in interface GroovyCodeVisitor
public void visitBinaryExpression(BinaryExpression expression)
visitBinaryExpression
in interface GroovyCodeVisitor
public void visitPrefixExpression(PrefixExpression expression)
visitPrefixExpression
in interface GroovyCodeVisitor
public void visitPostfixExpression(PostfixExpression expression)
visitPostfixExpression
in interface GroovyCodeVisitor
public void visitBooleanExpression(BooleanExpression expression)
visitBooleanExpression
in interface GroovyCodeVisitor
public void visitClosureExpression(ClosureExpression expression)
visitClosureExpression
in interface GroovyCodeVisitor
public void visitLambdaExpression(LambdaExpression expression)
visitLambdaExpression
in interface GroovyCodeVisitor
public void visitTupleExpression(TupleExpression expression)
visitTupleExpression
in interface GroovyCodeVisitor
public void visitMapExpression(MapExpression expression)
visitMapExpression
in interface GroovyCodeVisitor
public void visitMapEntryExpression(MapEntryExpression expression)
visitMapEntryExpression
in interface GroovyCodeVisitor
public void visitListExpression(ListExpression expression)
visitListExpression
in interface GroovyCodeVisitor
public void visitRangeExpression(RangeExpression expression)
visitRangeExpression
in interface GroovyCodeVisitor
public void visitPropertyExpression(PropertyExpression expression)
visitPropertyExpression
in interface GroovyCodeVisitor
public void visitAttributeExpression(AttributeExpression expression)
visitAttributeExpression
in interface GroovyCodeVisitor
public void visitFieldExpression(FieldExpression expression)
visitFieldExpression
in interface GroovyCodeVisitor
public void visitMethodPointerExpression(MethodPointerExpression expression)
visitMethodPointerExpression
in interface GroovyCodeVisitor
public void visitMethodReferenceExpression(MethodReferenceExpression expression)
visitMethodReferenceExpression
in interface GroovyCodeVisitor
public void visitConstantExpression(ConstantExpression expression)
visitConstantExpression
in interface GroovyCodeVisitor
public void visitClassExpression(ClassExpression expression)
visitClassExpression
in interface GroovyCodeVisitor
public void visitVariableExpression(VariableExpression expression)
visitVariableExpression
in interface GroovyCodeVisitor
public void visitDeclarationExpression(DeclarationExpression expression)
visitDeclarationExpression
in interface GroovyCodeVisitor
public void visitGStringExpression(GStringExpression expression)
visitGStringExpression
in interface GroovyCodeVisitor
public void visitArrayExpression(ArrayExpression expression)
visitArrayExpression
in interface GroovyCodeVisitor
public void visitSpreadExpression(SpreadExpression expression)
visitSpreadExpression
in interface GroovyCodeVisitor
public void visitSpreadMapExpression(SpreadMapExpression expression)
visitSpreadMapExpression
in interface GroovyCodeVisitor
public void visitNotExpression(NotExpression expression)
visitNotExpression
in interface GroovyCodeVisitor
public void visitUnaryMinusExpression(UnaryMinusExpression expression)
visitUnaryMinusExpression
in interface GroovyCodeVisitor
public void visitUnaryPlusExpression(UnaryPlusExpression expression)
visitUnaryPlusExpression
in interface GroovyCodeVisitor
public void visitBitwiseNegationExpression(BitwiseNegationExpression expression)
visitBitwiseNegationExpression
in interface GroovyCodeVisitor
public void visitCastExpression(CastExpression expression)
visitCastExpression
in interface GroovyCodeVisitor
public void visitArgumentlistExpression(ArgumentListExpression expression)
visitArgumentlistExpression
in interface GroovyCodeVisitor
public void visitClosureListExpression(ClosureListExpression closureListExpression)
visitClosureListExpression
in interface GroovyCodeVisitor
public void visitBytecodeExpression(BytecodeExpression expression)
visitBytecodeExpression
in interface GroovyCodeVisitor