Package net.ssehub.easy.varModel.cst
Class EmptyInitializer
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
-
- net.ssehub.easy.varModel.cst.Leaf
-
- net.ssehub.easy.varModel.cst.EmptyInitializer
-
- All Implemented Interfaces:
IAttributeAccess
public class EmptyInitializer extends Leaf
An internal temporary node representing an untyped empty initializer. Problem is that we allow the same syntax for empty compound and container initializers, i.e., we can only distinguish them according to their target type. This target type is not available in operation calls, as the operation is not yet determined. Thus, instances of this node (singleton, constant) can be used while parsing but shall be replaced by operation resolution as soon as it becomes clear which type actually shall be used.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyInitializerINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateEmptyInitializer()Prevents external initialization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IConstraintTreeVisitor visitor)Visiting method for the visitor.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
-
INSTANCE
public static final EmptyInitializer INSTANCE
-
-
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.
-
-