Class RuleCallExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.expressions.AbstractCallExpression
-
- net.ssehub.easy.instantiation.core.model.common.ModelCallExpression<VariableDeclaration,Script,AbstractRule>
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.RuleCallExpression
-
- All Implemented Interfaces:
IArgumentProvider
public class RuleCallExpression extends ModelCallExpression<VariableDeclaration,Script,AbstractRule>
Represents the explicit execution of a rule (precondition, rule body).- Author:
- Holger Eichelberger
-
-
Field Summary
-
Fields inherited from class net.ssehub.easy.instantiation.core.model.common.ModelCallExpression
resolved
-
-
Constructor Summary
Constructors Constructor Description RuleCallExpression()Constructor for serialization.RuleCallExpression(Script script, boolean isSuper, java.lang.String name, CallArgument... arguments)Creates a new rule call expression.RuleCallExpression(Script script, AbstractRule rule, CallArgument... arguments)Creates a new rule call expression for a known operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.protected java.lang.StringgetInvalidOperationMessage(IMetaOperation op)Returns the message to be returned in case of an invalid operation.protected java.lang.Class<? extends AbstractRule>getOperationClass()Returns the actual operation class, i.e., the class of the operation.booleanisVisible(Script fromModel)Returns whether the resolved model operation is visible.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.common.ModelCallExpression
getArgument, getArgumentsCount, getModel, getResolved, getVilSignature, inferType, isPlaceholder, isSuper
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.AbstractCallExpression
dynamicDispatch, getName, getParameterType, getPrefix, getQualifiedName, getSignature, getVilSignature, isIteratingCollectionOperation, isOclCompliant, isPlaceholder, resolveOperation, resolveOperation, resolveResolvableOperation
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
getFormattingHint, replaceEmptyLine
-
-
-
-
Constructor Detail
-
RuleCallExpression
RuleCallExpression()
Constructor for serialization.
-
RuleCallExpression
public RuleCallExpression(Script script, boolean isSuper, java.lang.String name, CallArgument... arguments) throws VilException
Creates a new rule call expression.- Parameters:
script- the actual script to resolve the rule onisSuper- this is a super callname- the name of the rulearguments- the actual arguments- Throws:
VilException- in case of an erroneously qualified name
-
RuleCallExpression
RuleCallExpression(Script script, AbstractRule rule, CallArgument... arguments) throws VilException
Creates a new rule call expression for a known operation.- Parameters:
script- the actual script to containingrulerule- the resolved rule to callarguments- the actual arguments- Throws:
VilException- in case of an erroneously qualified name
-
-
Method Detail
-
getOperationClass
protected java.lang.Class<? extends AbstractRule> getOperationClass()
Description copied from class:ModelCallExpressionReturns the actual operation class, i.e., the class of the operation.- Specified by:
getOperationClassin classModelCallExpression<VariableDeclaration,Script,AbstractRule>- Returns:
- the operation class
-
accept
public java.lang.Object accept(IExpressionVisitor visitor) throws VilException
Description copied from class:ExpressionVisits the expression.- Specified by:
acceptin classExpression- Parameters:
visitor- the visitor- Returns:
- the result of visiting this expression (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
getInvalidOperationMessage
protected java.lang.String getInvalidOperationMessage(IMetaOperation op)
Description copied from class:ModelCallExpressionReturns the message to be returned in case of an invalid operation.- Overrides:
getInvalidOperationMessagein classModelCallExpression<VariableDeclaration,Script,AbstractRule>- Parameters:
op- the invalid operation- Returns:
- the related message
-
isVisible
public boolean isVisible(Script fromModel)
Description copied from class:ModelCallExpressionReturns whether the resolved model operation is visible.- Specified by:
isVisiblein classModelCallExpression<VariableDeclaration,Script,AbstractRule>- Parameters:
fromModel- the model issuing the call- Returns:
trueif the operation is visible,falseelse
-
-