Package randoop.contract
Class ObjectContractUtils
java.lang.Object
randoop.contract.ObjectContractUtils
Utility methods for safely executing and printing
ObjectContract
code.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionOutcome
execute
(ObjectContract c, Object... objs) Executes the given contract via reflection.static String
localizeContractCode
(String str, Variable... vars) Replace dummy variables such as "x0" in the code by their real names.
-
Constructor Details
-
ObjectContractUtils
private ObjectContractUtils()
-
-
Method Details
-
execute
Executes the given contract via reflection.- Parameters:
c
- the contract to executeobjs
- the list of values to substitute for variables- Returns:
- the outcome from the execution
-
localizeContractCode
Replace dummy variables such as "x0" in the code by their real names.- Parameters:
str
- the contract code as a string with dummy variablesvars
- list ofVariable
objects- Returns:
- the contract code with actual variable names substituted for dummy names
-