Package net.ssehub.easy.varModel.cst
Class MultiAndExpression
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
-
- net.ssehub.easy.varModel.cst.MultiAndExpression
-
- All Implemented Interfaces:
IAttributeAccess
public class MultiAndExpression extends ConstraintSyntaxTree
Represents a multi-and expression.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private OCLFeatureCall[]expressions
-
Constructor Summary
Constructors Constructor Description MultiAndExpression(OCLFeatureCall... expressions)Creates a chained (multi-and) expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IConstraintTreeVisitor visitor)Visiting method for the visitor.OCLFeatureCallgetExpression(int index)Returns the specified expression.intgetExpressionCount()Returns the number of expressions represented by this expression.IDatatypeinferDatatype()Infers the datatype of the subtree represented by this object.-
Methods inherited from class net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
getAttribute, getAttribute, getAttributesCount, getContainedType, getName, getParent, isSemanticallyEqual
-
-
-
-
Field Detail
-
expressions
private OCLFeatureCall[] expressions
-
-
Constructor Detail
-
MultiAndExpression
public MultiAndExpression(OCLFeatureCall... expressions) throws CSTSemanticException
Creates a chained (multi-and) expression.- Parameters:
expressions- the individual expressions- Throws:
CSTSemanticException- ifexpressionsor an expression within is null
-
-
Method Detail
-
getExpressionCount
public int getExpressionCount()
Returns the number of expressions represented by this expression.- Returns:
- the number of expressions
-
getExpression
public OCLFeatureCall getExpression(int index)
Returns the specified expression.- Parameters:
index- the 0-based index- Returns:
- the expression
- Throws:
java.lang.IndexOutOfBoundsException- ifindex<0 || index >=getExpressionCount()
-
accept
public void accept(IConstraintTreeVisitor visitor)
Description copied from class:ConstraintSyntaxTreeVisiting method for the visitor.
This method is used for saving this model element.- Specified by:
acceptin classConstraintSyntaxTree- Parameters:
visitor- The visitor, which should save this model element.
-
inferDatatype
public IDatatype inferDatatype() throws CSTSemanticException
Description copied from class:ConstraintSyntaxTreeInfers the datatype of the subtree represented by this object.- Specified by:
inferDatatypein classConstraintSyntaxTree- Returns:
- the data type
- Throws:
CSTSemanticException- Will be thrown if parameters of (sub-) trees do not fit together.
-
-