T - Recursive generic type of the class implementing this interface.public interface ReflectiveModel<T extends ReflectiveModel<T>> extends Model
Model interface, so
that the classes implementing the model don't have to do it themselves. This mixin assumes, that
the class implementing it follows these rules:
ModeledConstructor, ModeledStaticMethod and ModeledInstanceMethod to mark the model methods. These methods should be private.
All annotated methods should take ModelHelper.MethodExecutionContext as the
first argument, the remaining arguments are Value arguments where their number
corresponds to the number of arguments the modelled method expects.
| Modifier and Type | Field and Description |
|---|---|
static org.apache.logging.log4j.Logger |
log |
| Modifier and Type | Method and Description |
|---|---|
default MethodResult |
init(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute a constructor call for the modeled class.
|
default MethodResult |
invoke(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute an instance method on the modeled object.
|
default MethodResult |
invokeStatic(MethodExecutionInfo methodExecutionInfo,
ValueCalculator valueCalculator)
Execute a static method for the modeled class.
|
default MethodResult init(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
ModelIt is suggested to add logic to allow running this only on a dummy model without any state.
init in interface ModelmethodExecutionInfo - execution info of the target method.valueCalculator - the value calculator that should be used to create any value in the
result.default MethodResult invoke(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
ModelIt is suggested to add logic to allow running this only on a model representing an initialized object.
default MethodResult invokeStatic(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
ModelIt is suggested to add logic to allow running this only on a dummy model without any state.
invokeStatic in interface ModelmethodExecutionInfo - execution info of the target method.valueCalculator - the value calculator that should be used to create any value in the
result.