Class AmbReceiver_c

  extended by polyglot.ext.jl.ast.Node_c
      extended by polyglot.ext.jl.ast.AmbPrefix_c
          extended by polyglot.ext.jl.ast.AmbReceiver_c
All Implemented Interfaces:
java.lang.Cloneable, Ambiguous, AmbPrefix, AmbReceiver, JL, Node, NodeOps, Prefix, Receiver, Typed, Copy

public class AmbReceiver_c
extends AmbPrefix_c
implements AmbReceiver

An AmbReceiver is an ambiguous AST node composed of dot-separated list of identifiers that must resolve to a receiver.

Field Summary
protected  Type type
Fields inherited from class polyglot.ext.jl.ast.AmbPrefix_c
name, prefix
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
Constructor Summary
AmbReceiver_c(Position pos, Prefix prefix, java.lang.String name)
Method Summary
 Node buildTypes(TypeBuilder tb)
          Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these.
 Node disambiguate(AmbiguityRemover ar)
          Disambiguate the receiver.
 Type type()
          Return the type of this node, or null if no type has been assigned yet.
 AmbReceiver type(Type type)
Methods inherited from class polyglot.ext.jl.ast.AmbPrefix_c
exceptionCheck, name, name, prefix, prefix, prettyPrint, reconstruct, toString, translate, typeCheck, visitChildren
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateEnter, disambiguateOverride, dump, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface polyglot.ast.AmbReceiver
name, prefix

Field Detail


protected Type type
Constructor Detail


public AmbReceiver_c(Position pos,
                     Prefix prefix,
                     java.lang.String name)
Method Detail


public Type type()
Description copied from interface: Typed
Return the type of this node, or null if no type has been assigned yet.

Specified by:
type in interface Typed


public AmbReceiver type(Type type)


public Node buildTypes(TypeBuilder tb)
                throws SemanticException
Description copied from interface: NodeOps
Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these. These type objects may be ambiguous. Inserts classes into the TypeSystem. This method is called by the leave() method of the visitor. The method should perform work that should be done after visiting the children of the node. The method may return this or a new copy of the node which will be installed as a child of the node's parent.

Specified by:
buildTypes in interface NodeOps
buildTypes in class Node_c
tb - The visitor which adds new type objects to the TypeSystem.


public Node disambiguate(AmbiguityRemover ar)
                  throws SemanticException
Disambiguate the receiver.

Specified by:
disambiguate in interface NodeOps
disambiguate in class AmbPrefix_c
ar - The visitor which disambiguates.