Class CompoundMatchExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.ruleMatch.AbstractRuleMatchExpression
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.ruleMatch.AbstractPathRuleMatchExpression
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.ruleMatch.CompoundMatchExpression
-
public class CompoundMatchExpression extends AbstractPathRuleMatchExpression
Denotes the special expression regarding a path match.- Author:
- Aike Sass
-
-
Field Summary
Fields Modifier and Type Field Description private CompositeExpressionexprivate Pathresolved
-
Constructor Summary
Constructors Constructor Description CompoundMatchExpression(CompositeExpression ex)Creates a path match expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Objectaccept(IMatchVisitor visitor)Accepts the given visitor for visiting.Collection<?>evaluate(IExpressionVisitor evaluator)Evaluates this expression.CompositeExpressiongetCompositeExpression()Returns the text used for creating the expression.TypeDescriptor<?>getEntryType()Returns the entry type over which this match expression will be able to iterate.PathgetResolved()Returns the resolved expression.(package private) voidresolve(Path resolved)Sets the resolved value of the match expression, in particular in case of mixed expressions.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.buildlangModel.ruleMatch.AbstractPathRuleMatchExpression
contributesTo, determineExpected, overlaps, overlaps, replace
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.buildlangModel.ruleMatch.AbstractRuleMatchExpression
accept, ensureType, inferType
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
getFormattingHint, replaceEmptyLine
-
-
-
-
Field Detail
-
ex
private CompositeExpression ex
-
resolved
private Path resolved
-
-
Constructor Detail
-
CompoundMatchExpression
public CompoundMatchExpression(CompositeExpression ex)
Creates a path match expression.- Parameters:
ex- theCompositeExpression
-
-
Method Detail
-
getCompositeExpression
public CompositeExpression getCompositeExpression()
Returns the text used for creating the expression.- Returns:
- the text
-
getEntryType
public TypeDescriptor<?> getEntryType()
Description copied from class:AbstractRuleMatchExpressionReturns the entry type over which this match expression will be able to iterate.- Specified by:
getEntryTypein classAbstractRuleMatchExpression- Returns:
- the entry type
-
accept
protected java.lang.Object accept(IMatchVisitor visitor) throws VilException
Description copied from class:AbstractRuleMatchExpressionAccepts the given visitor for visiting.- Specified by:
acceptin classAbstractRuleMatchExpression- Parameters:
visitor- the match visitor used for visiting- Returns:
- the result of visiting (may be null)
- Throws:
VilException- in case of visiting / evaluation errors
-
resolve
void resolve(Path resolved)
Sets the resolved value of the match expression, in particular in case of mixed expressions.- Parameters:
resolved- the resolved path
-
getResolved
public Path getResolved()
Returns the resolved expression.- Specified by:
getResolvedin classAbstractPathRuleMatchExpression- Returns:
- the resolved expression
-
evaluate
public Collection<?> evaluate(IExpressionVisitor evaluator) throws VilException
Description copied from class:AbstractRuleMatchExpressionEvaluates this expression. Some subtypes may define some kind of value resolution, e.g., for match expressions. This must be called before!- Specified by:
evaluatein classAbstractRuleMatchExpression- Parameters:
evaluator- the expression evaluator (in case that an actual expression must be evaluated as part of this evaluation).- Returns:
- the evaluation result
- Throws:
VilException- in case that evaluation fails
-
-