Class VilTypeExpression


  • public class VilTypeExpression
    extends Expression
    Represents a VIL type.
    Author:
    Holger Eichelberger
    • Field Detail

      • identifier

        private java.lang.String identifier
    • 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 VIL
        resolved - 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: Expression
        Infers the type of this expression including the type of the contained sub-expressions.
        Specified by:
        inferType in class Expression
        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: Expression
        Visits the expression.
        Specified by:
        accept in class Expression
        Parameters:
        visitor - the visitor
        Returns:
        the result of visiting this expression (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)