polyglot.ast
Interface Field

All Superinterfaces:
java.lang.Cloneable, Copy, Expr, JL, Node, NodeOps, Prefix, Receiver, Term, Typed, Variable
All Known Implementing Classes:
Field_c

public interface Field
extends Variable

A Field is an immutable representation of a Java field access. It consists of field name and may also have either a Type or an Expr containing the field being accessed.


Method Summary
 FieldInstance fieldInstance()
          Get the type object for the field.
 Field fieldInstance(FieldInstance fi)
          Set the type object for the field.
 boolean isTargetImplicit()
          Returns whether the target of this field is implicit, that is if the target is either "this" or a classname, and the source code did not explicitly provide a target.
 java.lang.String name()
          Get the field's name.
 Field name(java.lang.String name)
          Set the field's name.
 Receiver target()
          Get the field's container object or type.
 Field target(Receiver target)
          Set the field's container object or type.
 Field targetImplicit(boolean implicit)
          Set whether the target of the field is implicit.
 
Methods inherited from interface polyglot.ast.Variable
flags
 
Methods inherited from interface polyglot.ast.Expr
constantValue, isConstant, precedence, printSubExpr, printSubExpr, type
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.Typed
type
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 

Method Detail

fieldInstance

FieldInstance fieldInstance()
Get the type object for the field. This field may not be valid until after type checking.


fieldInstance

Field fieldInstance(FieldInstance fi)
Set the type object for the field.


target

Receiver target()
Get the field's container object or type. May be null before disambiguation.


target

Field target(Receiver target)
Set the field's container object or type.


isTargetImplicit

boolean isTargetImplicit()
Returns whether the target of this field is implicit, that is if the target is either "this" or a classname, and the source code did not explicitly provide a target.


targetImplicit

Field targetImplicit(boolean implicit)
Set whether the target of the field is implicit.


name

java.lang.String name()
Get the field's name.


name

Field name(java.lang.String name)
Set the field's name.