Package net.ssehub.easy.varModel.cst
Class NamedArgument
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
-
- net.ssehub.easy.varModel.cst.NamedArgument
-
- All Implemented Interfaces:
IAttributeAccess
public class NamedArgument extends ConstraintSyntaxTree
Implements a named argument as a transparent constraint syntax tree.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private ConstraintSyntaxTreeexpressionprivate java.lang.Stringname
-
Constructor Summary
Constructors Constructor Description NamedArgument(java.lang.String name, ConstraintSyntaxTree expression)Creates a named argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IConstraintTreeVisitor visitor)Visiting method for the visitor.java.lang.StringgetName()Returns the name of the constraint syntax tree (in case if it is used as a named argument).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, getParent, isSemanticallyEqual
-
-
-
-
Field Detail
-
expression
private ConstraintSyntaxTree expression
-
name
private java.lang.String name
-
-
Constructor Detail
-
NamedArgument
public NamedArgument(java.lang.String name, ConstraintSyntaxTree expression)Creates a named argument.- Parameters:
name- the nameexpression- the expression
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:ConstraintSyntaxTreeReturns the name of the constraint syntax tree (in case if it is used as a named argument).- Overrides:
getNamein classConstraintSyntaxTree- Returns:
- the name, may be null for none
-
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.
-
-