polyglot.ast
Interface Field

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

public interface Field
extends NamedVariable

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.


Field Summary
 
Fields inherited from interface polyglot.ast.Term
ENTRY, EXIT
 
Method Summary
 FieldInstance fieldInstance()
          Get the type object for the field.
 Field fieldInstance(FieldInstance fi)
          Set the type object for the field.
 Id id()
          Get the field's name.
 Field id(Id name)
          Set the field's name.
 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.NamedVariable
flags, varInstance
 
Methods inherited from interface polyglot.ast.Expr
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, 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, exceptions, exceptions, firstChild, 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.


id

Id id()
Get the field's name.


id

Field id(Id name)
Set the field's name.


name

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

Specified by:
name in interface NamedVariable

name

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