Class VilTypeExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.expressions.VilTypeExpression
-
public class VilTypeExpression extends Expression
Represents a VIL type.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringidentifierprivate TypeDescriptor<?>resolved
-
Constructor Summary
Constructors Constructor Description VilTypeExpression()Constructor for serialization.VilTypeExpression(java.lang.String identifier, TypeDescriptor<?> resolved)Creates the representing instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.java.lang.StringgetIdentifier()Returns the original identifier.TypeDescriptor<?>getResolved()Returns the resolved element.TypeDescriptor<?>inferType()Infers the type of this expression including the type of the contained sub-expressions.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
getFormattingHint, replaceEmptyLine
-
-
-
-
Field Detail
-
identifier
private java.lang.String identifier
-
resolved
private TypeDescriptor<?> resolved
-
-
Constructor Detail
-
VilTypeExpression
VilTypeExpression()
Constructor for serialization.
-
VilTypeExpression
public VilTypeExpression(java.lang.String identifier, TypeDescriptor<?> resolved)Creates the representing instance.- Parameters:
identifier- the identifier from VILresolved- the resolved type
-
-
Method Detail
-
getIdentifier
public java.lang.String getIdentifier()
Returns the original identifier.- Returns:
- the original identifier
-
getResolved
public TypeDescriptor<?> getResolved()
Returns the resolved element.- Returns:
- the resolved element
-
inferType
public TypeDescriptor<?> inferType() throws VilException
Description copied from class:ExpressionInfers the type of this expression including the type of the contained sub-expressions.- Specified by:
inferTypein classExpression- Returns:
- the type of this expression
- Throws:
VilException- in case that inferring the type fails
-
accept
public java.lang.Object accept(IExpressionVisitor visitor) throws VilException
Description copied from class:ExpressionVisits the expression.- Specified by:
acceptin classExpression- Parameters:
visitor- the visitor- Returns:
- the result of visiting this expression (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
-