Class AnnotationProcessor

java.lang.Object
org.apache.groovy.contracts.common.spi.AnnotationProcessor
Direct Known Subclasses:
ClassInvariantAnnotationProcessor, EnsuresAnnotationProcessor, RequiresAnnotationProcessor

public abstract class AnnotationProcessor extends Object

Base class for modifying the internal domain model, starting at Contract, and adding parts to it.

See Also:
  • Constructor Details

    • AnnotationProcessor

      public AnnotationProcessor()
  • Method Details

    • process

      public void process(ProcessingContextInformation processingContextInformation, Contract contract, ClassNode classNode, BlockStatement blockStatement, BooleanExpression booleanExpression)
      Processes a class-level contract annotation and updates the contract domain model.
      Parameters:
      processingContextInformation - the current processing context
      contract - the mutable contract model
      classNode - the annotated class
      blockStatement - the original contract block
      booleanExpression - the normalized boolean expression
    • process

      public void process(ProcessingContextInformation processingContextInformation, Contract contract, ClassNode classNode, MethodNode methodNode, BlockStatement blockStatement, BooleanExpression booleanExpression)
      Processes a method- or constructor-level contract annotation and updates the contract domain model.
      Parameters:
      processingContextInformation - the current processing context
      contract - the mutable contract model
      classNode - the declaring class
      methodNode - the annotated method or constructor
      blockStatement - the original contract block
      booleanExpression - the normalized boolean expression