Package net.ssehub.easy.varModel.cst
Class Let
java.lang.Object
net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
net.ssehub.easy.varModel.cst.Let
- All Implemented Interfaces:
IAttributeAccess
- Direct Known Subclasses:
IterLet
Represents a let expression, i.e. a local variable declaration which
can be used in the attached expression.
- Author:
- Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConstraintSyntaxTreeprivate DecisionVariableDeclaration -
Constructor Summary
ConstructorsConstructorDescriptionLet(DecisionVariableDeclaration var, ConstraintSyntaxTree inExpr) Creates a new let expression. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IConstraintTreeVisitor visitor) Visiting method for the visitor.booleanReturns the expression the local variable may be used in.Returns the initialization expression.Returns the local variable.inthashCode()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 Details
-
var
-
inExpr
-
-
Constructor Details
-
Let
Creates a new let expression.- Parameters:
var- the local variableinExpr- the expression the local variable may be used in
-
-
Method Details
-
getVariable
Returns the local variable.- Returns:
- the local variable
-
getInitExpression
Returns the initialization expression.- Returns:
- the initialization expression
-
getInExpression
Returns the expression the local variable may be used in.- Returns:
- the expression using the local variable
-
inferDatatype
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.
-
accept
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.
-
equals
-
hashCode
public int hashCode()
-