Class TemplateCallExpression
- 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,Template,Def>
-
- net.ssehub.easy.instantiation.core.model.templateModel.TemplateCallExpression
-
- All Implemented Interfaces:
IArgumentProvider
public class TemplateCallExpression extends ModelCallExpression<VariableDeclaration,Template,Def>
Represents the explicit execution of a template.- Author:
- Holger Eichelberger
-
-
Field Summary
-
Fields inherited from class net.ssehub.easy.instantiation.core.model.common.ModelCallExpression
resolved
-
-
Constructor Summary
Constructors Constructor Description TemplateCallExpression()Constructor for serialization.TemplateCallExpression(Template template, boolean isSuper, java.lang.String name, CallArgument... arguments)Creates a new template call expression.TemplateCallExpression(Template template, Def def, CallArgument... arguments)Creates a new template 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<Def>getOperationClass()Returns the actual operation class, i.e., the class of the operation.booleanisVisible(Template 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
-
TemplateCallExpression
TemplateCallExpression()
Constructor for serialization.
-
TemplateCallExpression
public TemplateCallExpression(Template template, boolean isSuper, java.lang.String name, CallArgument... arguments) throws VilException
Creates a new template call expression.- Parameters:
template- the actual script to resolve the call onisSuper- this is a super callname- the name of the templatearguments- the actual arguments- Throws:
VilException- in case of an erroneously qualified name
-
TemplateCallExpression
TemplateCallExpression(Template template, Def def, CallArgument... arguments) throws VilException
Creates a new template call expression for a known operation.- Parameters:
template- the actual template to containingdefdef- the resolved sub-templatearguments- the actual arguments- Throws:
VilException- in case of an erroneously qualified name
-
-
Method Detail
-
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)
-
getOperationClass
protected java.lang.Class<Def> getOperationClass()
Description copied from class:ModelCallExpressionReturns the actual operation class, i.e., the class of the operation.- Specified by:
getOperationClassin classModelCallExpression<VariableDeclaration,Template,Def>- Returns:
- the operation class
-
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,Template,Def>- Parameters:
op- the invalid operation- Returns:
- the related message
-
isVisible
public boolean isVisible(Template fromModel)
Description copied from class:ModelCallExpressionReturns whether the resolved model operation is visible.- Specified by:
isVisiblein classModelCallExpression<VariableDeclaration,Template,Def>- Parameters:
fromModel- the model issuing the call- Returns:
trueif the operation is visible,falseelse
-
-