|
|||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||
See:
Description
| Class Summary | |
| AppendReturnTransformation | A transformation to append code to load the method's result from a local variable, and return. |
| ClassTransformer | A ClassTransformer executes a complex transformation on a JavaClass object. |
| ContractCheckTransformation | A transformation to insert a call to the contract method into a non-contract method. |
| ContractMethodTransformation | Superclass for transformations that modify contract methods. |
| ContractTransformation | Abstract super class for contract transformations. |
| InstrumentedFlagTransformation | A transformation to insert a flag constant into the constant pool of a class to mark the class as instrumented. |
| InvariantCheckTransformation | A transformation to insert code to check the invariant of each
method by calling _Invariant. |
| InvariantMethodTransformation | A transformation to prepare invariant methods. |
| LoadContractClassTransformation | A transformation that loads the contract class for the transformed class into the Repository so that it will be available to subsequent transformations. |
| LockCloneTransformation | Transformation to disable contract checking while in the
clone() method. |
| MarkInstrumentedTransformation | A transformation to insert a flag constant into the constant pool of a class to mark the class as instrumented. |
| MethodSet | A simple container to hold MethodGen objects. |
| PostconditionCheckTransformation | A transformation to insert code to check the postcondition of each
method by calling method_Postcondition. |
| PostconditionMethodTransformation | A transformation to prepare postcondition methods. |
| PreconditionCheckTransformation | A transformation to insert code to check the precondition of each
method by calling method_Precondition. |
| PreconditionMethodTransformation | A transformation to prepare precondition methods. |
| RemoveContractMethodsTransformation | Transformation to remove the contract methods from a class, to decrease the size of the bytecode. |
| ReplaceOldReferencesTransformation | Transformation to replace references to OLD in postconditions. |
| ReplaceReturnInstructionsTransformation | A transformation to replace all the return statements in a non-contract methods with a jump to the end of the method, so that exit condition checking code may be appended to the instruction list. |
| SaveOldStateTransformation | This transformation adds code to postconditions that refer to old to call to clone an object, and push the clone onto the stack of saved instances in jContractorRuntime. |
| Transformation | Abstract description of a transformation that can be applied to a class. |
| Exception Summary | |
| AbortTransformationException | An exception that will be thrown by a Transformation when an error occurs that requires that the ClassTransformer abort all subsequent transformations. |
This package defines a fairly generic framework for transforming Java bytecode, and specific transformations for jContractor. Each small transformation step is written as a subclass of Transformation, and multiple transformations are combined into a ClassTransformer. The ClassTransformer takes in a class and executes each of its component transformations in sequence.
As well as the generic transformation framework, this package also contains a set of transformations specific to jContractor, that are used to add contract checking code to class files. ContractTransformation is a superclass to almost all of these, and defines various utility methods that ease the job of adding contract checks.
Many of jContractor's transformations are subclasses of either ContractCheckTransformation or ContractMethodTransformation. Descendents of ContractCheckTransformation are charged with inserting a call to the contract method into the non-contract method, and throwing an appropriate exception if the contract fails. Descendents of ContractMethodTransformation have the task of modifying the contract methods to include the superclass contract, the external contract (from a contract class), and any contracts inherited from interfaces.
|
|||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||