polyglot.ast
Interface FieldDecl

All Superinterfaces:
ClassMember, java.lang.Cloneable, Copy, JL, Node, NodeOps, Term
All Known Implementing Classes:
FieldDecl_c

public interface FieldDecl
extends ClassMember

A FieldDecl is an immutable representation of the declaration of a field of a class.


Method Summary
 Type declType()
          Get the type object for the declaration's type.
 FieldInstance fieldInstance()
          Get the type object for the field we are declaring.
 FieldDecl fieldInstance(FieldInstance fi)
          Set the type object for the field we are declaring.
 Flags flags()
          Get the declaration's flags.
 FieldDecl flags(Flags flags)
          Set the declaration's flags.
 Expr init()
          Get the declaration's initializer, or null.
 FieldDecl init(Expr init)
          Set the declaration's initializer.
 InitializerInstance initializerInstance()
          Get the type object for the initializer expression, or null.
 FieldDecl initializerInstance(InitializerInstance fi)
          Set the type object for the initializer expression.
 java.lang.String name()
          Get the declaration's name.
 FieldDecl name(java.lang.String name)
          Set the declaration's name.
 TypeNode type()
          Get the declaration's type.
 FieldDecl type(TypeNode type)
          Set the declaration's type.
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
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
 

Method Detail

declType

Type declType()
Get the type object for the declaration's type.


flags

Flags flags()
Get the declaration's flags.


flags

FieldDecl flags(Flags flags)
Set the declaration's flags.


type

TypeNode type()
Get the declaration's type.


type

FieldDecl type(TypeNode type)
Set the declaration's type.


name

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


name

FieldDecl name(java.lang.String name)
Set the declaration's name.


init

Expr init()
Get the declaration's initializer, or null.


init

FieldDecl init(Expr init)
Set the declaration's initializer.


fieldInstance

FieldInstance fieldInstance()
Get the type object for the field we are declaring. This field may not be valid until after signature disambiguation.


fieldInstance

FieldDecl fieldInstance(FieldInstance fi)
Set the type object for the field we are declaring.


initializerInstance

InitializerInstance initializerInstance()
Get the type object for the initializer expression, or null. We evaluate the initializer expression as if it were in an initializer block (e.g., { } or static { }).


initializerInstance

FieldDecl initializerInstance(InitializerInstance fi)
Set the type object for the initializer expression.