Package net.ssehub.easy.varModel.cst
Class Self
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
-
- net.ssehub.easy.varModel.cst.Leaf
-
- net.ssehub.easy.varModel.cst.Self
-
- All Implemented Interfaces:
IAttributeAccess
public class Self extends Leaf
Represents the a compound itself (for constraints within compounds). Self must be replaced accordingly, e.g., by all-quantification.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IConstraintTreeVisitor visitor)Visiting method for the visitor.IDatatypegetType()Returns the type (without exception throwing).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
-
type
private Compound type
-
-
Constructor Detail
-
Self
Self()
Constructor for serialization.
-
Self
public Self(Compound type)
Creates a self constant fortype.- Parameters:
type- the actual type of this self leaf
-
-
Method Detail
-
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.
-
getType
public IDatatype getType()
Returns the type (without exception throwing).- Returns:
- the type of "self"
-
-