public class

TypeExpression

extends Expression
java.lang.Object
   ↳ sun.tools.tree.Node
     ↳ sun.tools.tree.Expression
       ↳ sun.tools.tree.TypeExpression

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
[Expand]
Inherited Fields
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
Public Constructors
TypeExpression(long where, Type type)
Constructor
Public Methods
Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp, UnaryExpression loc)
Check something that might be an AmbiguousName (refman 6.5.2).
Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp)
Check an expression
Expression inline(Environment env, Context ctx)
Inline.
void print(PrintStream out)
Print
[Expand]
Inherited Methods
From class sun.tools.tree.Expression
From class sun.tools.tree.Node
From class java.lang.Object

Public Constructors

public TypeExpression (long where, Type type)

Constructor

Public Methods

public Vset checkAmbigName (Environment env, Context ctx, Vset vset, Hashtable exp, UnaryExpression loc)

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.

  • public Vset checkValue (Environment env, Context ctx, Vset vset, Hashtable exp)

    Check an expression

    public Expression inline (Environment env, Context ctx)

    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.

    public void print (PrintStream out)

    Print