Package: org.apache.groovy.contracts.ast.visitor

## [Java] Class AnnotationContractParameterVisitor

- org.apache.groovy.contracts.ast.visitor.AnnotationContractParameterVisitor

-     public class AnnotationContractParameterVisitor
      extends BaseVisitor

  This BaseVisitor walks up the class hierarchy for the given ClassNode and adds ContractElement annotations to method parameters.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class BaseVisitor` | `GCONTRACTS_ENABLED_VAR, sourceUnit`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AnnotationContractParameterVisitor(SourceUnit sourceUnit, ReaderSource source)` Creates a visitor that scans inherited method parameters for contract annotations.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `visitAnnotations(AnnotatedNode node)` Triggers contract-meta-annotation lookup for parameter annotations on the current method.
    `` | `public void` | `visitClass(ClassNode node)` Visits the class hierarchy and implemented interfaces of the supplied node.
    `` | `public void` | `visitMethod(MethodNode node)` Tracks the currently visited method so parameter annotations can be resolved in context.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class BaseVisitor` | `asConditionExecution, getOriginalCondition, getReplacedCondition, getSourceUnit, replaceCondition`
    `class ClassCodeVisitorSupport` | `addError, getSourceUnit, visitAnnotation, visitAnnotations, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitClosureExpression, visitConstructor, visitConstructorOrMethod, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitProperty, visitReturnStatement, visitStatement, visitStatementAnnotations, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop, visitYieldStatement`
    `class CodeVisitorSupport` | `afterSwitchCaseStatementsVisited, afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, afterSwitchConditionExpressionVisited, 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, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSwitchExpression, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop, visitYieldStatement`

- - ### Constructor Detail

    - #### public AnnotationContractParameterVisitor(SourceUnit sourceUnit, ReaderSource source)

      Creates a visitor that scans inherited method parameters for contract annotations.

      Parameters:
        `sourceUnit` - the source unit currently being transformed
        `source` - the reader source backing the source unit

  - ### Method Detail

    - #### public void visitAnnotations(AnnotatedNode node)

      Triggers contract-meta-annotation lookup for parameter annotations on the current method.

      Parameters:
        `node` - the annotated node being visited

    - #### public void visitClass(ClassNode node)

      Visits the class hierarchy and implemented interfaces of the supplied node.

      Parameters:
        `node` - the class to inspect

    - #### public void visitMethod(MethodNode node)

      Tracks the currently visited method so parameter annotations can be resolved in context.

      Parameters:
        `node` - the method being visited