public class

FieldExpression

extends UnaryExpression
java.lang.Object
   ↳ sun.tools.tree.Node
     ↳ sun.tools.tree.Expression
       ↳ sun.tools.tree.UnaryExpression
         ↳ sun.tools.tree.FieldExpression

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
FieldExpression(long where, Expression right, Identifier id)
constructor
FieldExpression(long where, Expression right, MemberDefinition field)
Public Methods
Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp, UnaryExpression loc)
Check if the present name is part of a scoping prefix.
Vset checkAssignOp(Environment env, Context ctx, Vset vset, Hashtable exp, Expression outside)
Check the expression if it appears on the LHS of an op= expression
static Vset checkFinalAssign(Environment env, Context ctx, Vset vset, long where, MemberDefinition field)
There is a simple assignment being made to the given final field.
Vset checkLHS(Environment env, Context ctx, Vset vset, Hashtable exp)
Check the expression if it appears on the LHS of an assignment
Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp)
Check the expression
void codeValue(Environment env, Context ctx, Assembler asm)
Expression copyInline(Context ctx)
Create a copy of the expression for method inlining
int costInline(int thresh, Environment env, Context ctx)
The cost of inlining this expression
FieldUpdater getAssigner(Environment env, Context ctx)
Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment.
Expression getImplementation()
Type checking may assign a more complex implementation to an innocuous-looking expression (like an identifier).
FieldUpdater getUpdater(Environment env, Context ctx)
Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment.
Expression inline(Environment env, Context ctx)
Inline
Expression inlineLHS(Environment env, Context ctx)
Expression inlineValue(Environment env, Context ctx)
boolean isConstant()
Check if constant: Will it inline away?
void print(PrintStream out)
Print
static Identifier toIdentifier(Expression e)
Convert an '.' expression to a qualified identifier
[Expand]
Inherited Methods
From class sun.tools.tree.UnaryExpression
From class sun.tools.tree.Expression
From class sun.tools.tree.Node
From class java.lang.Object

Public Constructors

public FieldExpression (long where, Expression right, Identifier id)

constructor

public FieldExpression (long where, Expression right, MemberDefinition field)

Public Methods

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

Check if the present name is part of a scoping prefix.

public Vset checkAssignOp (Environment env, Context ctx, Vset vset, Hashtable exp, Expression outside)

Check the expression if it appears on the LHS of an op= expression

public static Vset checkFinalAssign (Environment env, Context ctx, Vset vset, long where, MemberDefinition field)

There is a simple assignment being made to the given final field. The field was named either by a simple name or by an almost-simple expression of the form "this.v". Check if this is a legal assignment.

Blank final variables can be set in initializers or constructor bodies. In all cases there must be definite single assignment. (All instance and instance variable initializers and each constructor body are treated as if concatenated for the purposes of this check. Assignment to "this.x" is treated as a definite assignment to the simple name "x" which names the instance variable.)

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

Check the expression if it appears on the LHS of an assignment

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

Check the expression

public void codeValue (Environment env, Context ctx, Assembler asm)

public Expression copyInline (Context ctx)

Create a copy of the expression for method inlining

public int costInline (int thresh, Environment env, Context ctx)

The cost of inlining this expression

public FieldUpdater getAssigner (Environment env, Context ctx)

Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment. This is used for implementing assignments to private fields for which an access method is required. Returns null if no access method is needed, in which case the assignment is handled in the usual way, by direct access. Only simple assignment expressions are handled here Assignment operators and pre/post increment/decrement operators are are handled by 'getUpdater' below.

Must be called after 'checkValue', else 'right' will be invalid.

public Expression getImplementation ()

Type checking may assign a more complex implementation to an innocuous-looking expression (like an identifier). Return that implementation, or the original expression itself if there is no special implementation.

This appears at present to be dead code, and is not called from within javac. Access to the implementation generally occurs within the same class, and thus uses the underlying field directly.

public FieldUpdater getUpdater (Environment env, Context ctx)

Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment. This is used for implementing the assignment operators and the increment and decrement operators on private fields that are accessed from another class, e.g, uplevel from an inner class. Returns null if no access method is needed.

Must be called after 'checkValue', else 'right' will be invalid.

public Expression inline (Environment env, Context ctx)

Inline

public Expression inlineLHS (Environment env, Context ctx)

public Expression inlineValue (Environment env, Context ctx)

public boolean isConstant ()

Check if constant: Will it inline away?

public void print (PrintStream out)

Print

public static Identifier toIdentifier (Expression e)

Convert an '.' expression to a qualified identifier