Class TypeExpression

All Implemented Interfaces:
Cloneable, Constants, RuntimeConstants

public class TypeExpression extends Expression
WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
  • Constructor Details

    • TypeExpression

      public TypeExpression(long where, Type type)
      Constructor
  • Method Details

    • toType

      Type toType(Environment env, Context ctx)
      Convert to a type
      Overrides:
      toType in class Expression
    • checkValue

      public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object,Object> exp)
      Check an expression
      Overrides:
      checkValue in class Expression
    • checkAmbigName

      public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object,Object> exp, UnaryExpression loc)
      Description copied from class: Expression
      Check something that might be an AmbiguousName (refman 6.5.2). A string of dot-separated identifiers might be, in order of preference:
    • a variable name followed by fields or types
    • a type name followed by fields or types
    • a package name followed a type and then fields or types If a type name is found, it rewrites itself as a TypeExpression. If a node decides it can only be a package prefix, it sets its type to Type.tPackage. The caller must detect this and act appropriately to verify the full package name.
    • Overrides:
      checkAmbigName in class Expression
    • inline

      public Expression inline(Environment env, Context ctx)
      Description copied from class: Expression
      Inline. Recursively simplify each child of an expression node, destructively replacing the child with the simplified result. Also attempts to simplify the current node 'this', and returns the simplified result. The name 'inline' is somthing of a misnomer, as these methods are responsible for compile-time expression simplification in general. The 'eval' and 'simplify' methods apply to a single expression node only -- it is 'inline' and 'inlineValue' that drive the simplification of entire expressions.
      Overrides:
      inline in class Expression
    • print

      public void print(PrintStream out)
      Print
      Overrides:
      print in class Expression