edu.ucsb.ccs.jcontractor.transformation
Class RemoveContractMethodsTransformation
java.lang.Object
|
+--edu.ucsb.ccs.jcontractor.transformation.Transformation
|
+--edu.ucsb.ccs.jcontractor.transformation.ContractTransformation
|
+--edu.ucsb.ccs.jcontractor.transformation.RemoveContractMethodsTransformation
- public class RemoveContractMethodsTransformation
- extends ContractTransformation
Transformation to remove the contract methods from a class, to
decrease the size of the bytecode. Once contract checks are
inserted, the class becomes dependant on its contract methods to
run correctly. For this reason it is not safe remove the
contract methods from an instrumented class.
- Version:
- $Id: RemoveContractMethodsTransformation.java,v 1.2 2003/01/26 10:50:33 parkera Exp $
- Author:
- Chris Niederauer, Parker Abercrombie
|
Method Summary |
boolean |
acceptClass()
Determine if the current class should be processed. |
void |
transformClass()
Remove the contract methods from a class. |
void |
transformMethod(org.apache.bcel.generic.MethodGen mg)
Does nothing. |
| Methods inherited from class edu.ucsb.ccs.jcontractor.transformation.ContractTransformation |
canCheckEntryInvariant, canCheckExitInvariant, canCheckPostcondition, canCheckPrecondition, canHaveInvariant, canHavePostcondition, canHavePrecondition, canReferenceOld, contractsCheckable, getContractClassName, getContractClassName, getInvariantMethodName, getInvariantMethodSignature, getPostconditionMethodName, getPostconditionMethodSignature, getPreconditionMethodName, getPreconditionMethodSignature, isContractClass, isContractMethod, isInvariantMethod, isPostconditionMethod, isPreconditionMethod |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveContractMethodsTransformation
public RemoveContractMethodsTransformation()
acceptClass
public boolean acceptClass()
- Determine if the current class should be processed. All classes
in which contracts are checkable are processed.
- Overrides:
acceptClass in class Transformation
- Returns:
- true if contracts are checkable in
the current class.
transformClass
public void transformClass()
- Remove the contract methods from a class. Instrumentation
filters have different meaning when it comes to removing
contracts:
none Do nothing, retain all contract methods.
pre Remove postconditions and invariants.
post Remove invariants.
all Remove all contract methods.
- Overrides:
transformClass in class Transformation
transformMethod
public void transformMethod(org.apache.bcel.generic.MethodGen mg)
- Does nothing.
- Overrides:
transformMethod in class Transformation