Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.transform.powerassert
Class AssertionRewriter

    java.lang.Object
      org.codehaus.groovy.ast.CodeVisitorSupport
          org.codehaus.groovy.ast.ClassCodeVisitorSupport
              org.codehaus.groovy.transform.powerassert.StatementReplacingVisitorSupport
                  org.codehaus.groovy.transform.powerassert.AssertionRewriter

    class AssertionRewriter
    extends StatementReplacingVisitorSupport

Rewrites all assertions in a source unit.

author:
  Peter Niederwieser

Field Summary
`static VariableExpression` | `recorderVariable`

Constructor Summary
`private AssertionRewriter(SourceUnit sourceUnit)`

Method Summary
`protected SourceUnit` | `getSourceUnit()`
`static void` | `rewrite(SourceUnit sourceUnit)` Rewrites all assertions in the given source unit.
`void` | `visitAssertStatement(AssertStatement stat)`
`void` | `visitClass(ClassNode node)`
`void` | `visitClosureExpression(ClosureExpression expr)`
`void` | `visitConstructor(ConstructorNode constructor)`
`void` | `visitMethod(MethodNode method)`

Methods inherited from class StatementReplacingVisitorSupport
replace, replaceAll, replaceVisitedStatementWith, visitBlockStatement, visitCaseStatement, visitCatchStatement, visitDoWhileLoop, visitForLoop, visitIfElse, visitSwitch, visitSynchronizedStatement, visitTryCatchFinally, visitWhileLoop

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

### recorderVariable

    static final VariableExpression recorderVariable

Constructor Detail

### AssertionRewriter

    private AssertionRewriter(SourceUnit sourceUnit)

Method Detail

### getSourceUnit

    @Override
    protected SourceUnit getSourceUnit()

### rewrite

    public static void rewrite(SourceUnit sourceUnit)

  Rewrites all assertions in the given source unit.
  param:
    sourceUnit a source unit

### visitAssertStatement

    @Override
    public void visitAssertStatement(AssertStatement stat)

### visitClass

    @Override
    @SuppressWarnings("unchecked")
    public void visitClass(ClassNode node)

### visitClosureExpression

    @Override
    public void visitClosureExpression(ClosureExpression expr)

### visitConstructor

    @Override
    public void visitConstructor(ConstructorNode constructor)

### visitMethod

    @Override
    public void visitMethod(MethodNode method)

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