Class BuildExecutionApplicator
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.matchLoop.Applicator
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.matchLoop.BuildExecutionApplicator
-
public class BuildExecutionApplicator extends Applicator
An applicator which actually executes a rule body if build is required for a LHS/RHS match. Execution will fail upon the firstRuleExecutionResult.Status.FAIL.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private RuleExecutionContextcontextprivate RuntimeEnvironmentenvironmentprivate RuleBodyExecutorexecutorprivate RuleExecutionResult.Statusstatus-
Fields inherited from class net.ssehub.easy.instantiation.core.model.buildlangModel.matchLoop.Applicator
rhsValues, rule
-
-
Constructor Summary
Constructors Constructor Description BuildExecutionApplicator(RuntimeEnvironment environment, RuleExecutionContext context, RuleBodyExecutor executor)Creates the applicator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(java.lang.Object expectedLhsValue, java.lang.Object rhsValue, int index)Apply this applicator for one combination which requires building.RuleExecutionResult.StatusgetStatus()Returns the status of the execution.booleanstopConditionLoop()Enables a pre-exit of the condition loop.booleanstopMatchLoop()Enables a pre-exit of the match loop.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.buildlangModel.matchLoop.Applicator
conditionLoopFinished, getElementCount, initialize, matchLoopFinished
-
-
-
-
Field Detail
-
status
private RuleExecutionResult.Status status
-
environment
private RuntimeEnvironment environment
-
context
private RuleExecutionContext context
-
executor
private RuleBodyExecutor executor
-
-
Constructor Detail
-
BuildExecutionApplicator
public BuildExecutionApplicator(RuntimeEnvironment environment, RuleExecutionContext context, RuleBodyExecutor executor)
Creates the applicator.- Parameters:
environment- the actual runtime environmentcontext- the actual rule execution contextexecutor- the actual rule executor
-
-
Method Detail
-
apply
public void apply(java.lang.Object expectedLhsValue, java.lang.Object rhsValue, int index) throws VilExceptionDescription copied from class:ApplicatorApply this applicator for one combination which requires building. This may be due to the fact thatrhsValue- is newer than
expectedLhsValue - exists but
expectedLhsValuedoes not exist - exists but no LHS is specified (
expectedLhsValueis null)
- Specified by:
applyin classApplicator- Parameters:
expectedLhsValue- the expected result after buildingrhsValue(may be null)rhsValue- the value determined for the right side as part of a matchindex- the 0-based index of the RHS match condition in the specifying rule (Applicator.getElementCount()- Throws:
VilException- in case that executing parts of a rule or setting variable values fails
- is newer than
-
getStatus
public RuleExecutionResult.Status getStatus()
Returns the status of the execution.- Returns:
- the status
-
stopMatchLoop
public boolean stopMatchLoop()
Description copied from class:ApplicatorEnables a pre-exit of the match loop.- Overrides:
stopMatchLoopin classApplicator- Returns:
trueif the match loop shall exit before the next iteration,falseif the loop shall continue (default)
-
stopConditionLoop
public boolean stopConditionLoop()
Description copied from class:ApplicatorEnables a pre-exit of the condition loop.- Overrides:
stopConditionLoopin classApplicator- Returns:
trueif the condition loop shall exit before the next iteration,falseif the loop shall continue (default)
-
-