public interface Model
The data tracked and logic to handle the methods of the modeled class are implementation-specific.
The implementations are expected to override Object.equals(Object) and Object.hashCode() to guarantee the expected behavior during the analysis.
The interface methods init, invoke, and invokeStatic are meant to be used to
handle the proper method calls on the modeled object.
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getType()
Returns the type of the modeled class.
|
MethodResult |
init(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute a constructor call for the modeled class.
|
MethodResult |
invoke(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute an instance method on the modeled object.
|
MethodResult |
invokeStatic(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute a static method for the modeled class.
|
@NotNull @NotNull java.lang.String getType()
MethodResult init(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
It is suggested to add logic to allow running this only on a dummy model without any state.
methodExecutionInfo - execution info of the target method.valueCalculator - the value calculator that should be used to create any value in the
result.MethodResult invoke(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
It is suggested to add logic to allow running this only on a model representing an initialized object.
methodExecutionInfo - execution info of the target method.valueCalculator - the value calculator that should be used to create any value in the
result.MethodResult invokeStatic(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
It is suggested to add logic to allow running this only on a dummy model without any state.
methodExecutionInfo - execution info of the target method.valueCalculator - the value calculator that should be used to create any value in the
result.