Package net.ssehub.easy.varModel.cst
Class DeferInitExpression
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
-
- net.ssehub.easy.varModel.cst.DeferInitExpression
-
- All Implemented Interfaces:
IAttributeAccess
public class DeferInitExpression extends ConstraintSyntaxTree
An expression to indicate that the contained expression shall not be evaluated rather than used as value. The need may occur when translating compound and constraint initializer values into expression to obtain full values for default assignment, which is permitted in EASy per variable only once. This is an internal, temporary constraint node and thus does not support visiting.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private ConstraintSyntaxTreecst
-
Constructor Summary
Constructors Constructor Description DeferInitExpression(ConstraintSyntaxTree cst)Creates the expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IConstraintTreeVisitor visitor)Visiting method for the visitor.ConstraintSyntaxTreegetExpression()Returns the deferred 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
-
cst
private ConstraintSyntaxTree cst
-
-
Constructor Detail
-
DeferInitExpression
public DeferInitExpression(ConstraintSyntaxTree cst)
Creates the expression.- Parameters:
cst- the deferred expression
-
-
Method Detail
-
getExpression
public ConstraintSyntaxTree getExpression()
Returns the deferred expression.- Returns:
- the expression
-
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.
-
-