Class BaseGenerator
java.lang.Object
org.apache.groovy.contracts.generation.BaseGenerator
- Direct Known Subclasses:
 ClassInvariantGenerator,PostconditionGenerator,PreconditionGenerator
Base class for groovy-contracts code generators.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected final ReaderSource - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanExpressionaddCallsToSuperMethodNodeAnnotationClosure(ClassNode type, MethodNode methodNode, Class<? extends Annotation> annotationType, BooleanExpression booleanExpression, boolean isPostcondition) protected BlockStatementgetInlineModeBlockStatement(BlockStatement blockStatement) static StringgetInvariantMethodName(ClassNode classNode) static MethodNodegetInvariantMethodNode(ClassNode classNode) protected BlockStatementwrapAssertionBooleanExpression(ClassNode type, MethodNode methodNode, BooleanExpression classInvariantExpression, String assertionType)  
- 
Field Details
- 
INVARIANT_CLOSURE_PREFIX
- See Also:
 
 - 
META_DATA_USE_INLINE_MODE
- See Also:
 
 - 
source
 
 - 
 - 
Constructor Details
- 
BaseGenerator
 
 - 
 - 
Method Details
- 
getInvariantMethodName
- Parameters:
 classNode- theClassNodeused to look up the invariant closure field- Returns:
 - the field name of the invariant closure field of the given classNode
 
 - 
getInvariantMethodNode
- Parameters:
 classNode- theClassNodeused to look up the invariant closure field- Returns:
 - the 
MethodNodewhich contains the invariant of the given classNode 
 - 
getInlineModeBlockStatement
 - 
wrapAssertionBooleanExpression
protected BlockStatement wrapAssertionBooleanExpression(ClassNode type, MethodNode methodNode, BooleanExpression classInvariantExpression, String assertionType)  - 
addCallsToSuperMethodNodeAnnotationClosure
protected BooleanExpression addCallsToSuperMethodNodeAnnotationClosure(ClassNode type, MethodNode methodNode, Class<? extends Annotation> annotationType, BooleanExpression booleanExpression, boolean isPostcondition)  
 -