Class PostconditionLifecycle
java.lang.Object
org.apache.groovy.contracts.common.base.BaseLifecycle
org.apache.groovy.contracts.common.impl.lc.PostconditionLifecycle
- All Implemented Interfaces:
Lifecycle
Internal
Lifecycle implementation for post-conditions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterProcessingConstructorNode(ProcessingContextInformation processingContextInformation, ClassNode classNode, MethodNode constructorNode) Adds inherited default postconditions to the supplied constructor when needed.voidafterProcessingMethodNode(ProcessingContextInformation processingContextInformation, ClassNode classNode, MethodNode methodNode) Adds inherited default postconditions to the supplied method when needed.voidbeforeProcessingClassNode(ProcessingContextInformation processingContextInformation, ClassNode classNode) Ensures the helper method for computingoldvalues exists before postconditions are injected.Methods inherited from class org.apache.groovy.contracts.common.base.BaseLifecycle
afterProcessingClassNode, beforeProcessingConstructorNode, beforeProcessingMethodNode
-
Constructor Details
-
PostconditionLifecycle
public PostconditionLifecycle()
-
-
Method Details
-
beforeProcessingClassNode
public void beforeProcessingClassNode(ProcessingContextInformation processingContextInformation, ClassNode classNode) Ensures the helper method for computingoldvalues exists before postconditions are injected.- Specified by:
beforeProcessingClassNodein interfaceLifecycle- Overrides:
beforeProcessingClassNodein classBaseLifecycle- Parameters:
processingContextInformation- the current processing contextclassNode- the class being prepared
-
afterProcessingConstructorNode
public void afterProcessingConstructorNode(ProcessingContextInformation processingContextInformation, ClassNode classNode, MethodNode constructorNode) Adds inherited default postconditions to the supplied constructor when needed.- Specified by:
afterProcessingConstructorNodein interfaceLifecycle- Overrides:
afterProcessingConstructorNodein classBaseLifecycle- Parameters:
processingContextInformation- the current processing contextclassNode- the declaring classconstructorNode- the constructor to update
-
afterProcessingMethodNode
public void afterProcessingMethodNode(ProcessingContextInformation processingContextInformation, ClassNode classNode, MethodNode methodNode) Adds inherited default postconditions to the supplied method when needed.- Specified by:
afterProcessingMethodNodein interfaceLifecycle- Overrides:
afterProcessingMethodNodein classBaseLifecycle- Parameters:
processingContextInformation- the current processing contextclassNode- the declaring classmethodNode- the method to update
-