polyglot.ast
Class Id_c

java.lang.Object
  extended by polyglot.ast.Node_c
      extended by polyglot.ast.Id_c
All Implemented Interfaces:
java.lang.Cloneable, Id, JL, Node, NodeOps, Copy

public class Id_c
extends Node_c
implements Id

An AmbExpr is an ambiguous AST node composed of a single identifier that must resolve to an expression.


Field Summary
protected  java.lang.String id
           
 
Fields inherited from class polyglot.ast.Node_c
del, error, ext, position
 
Constructor Summary
Id_c(Position pos, java.lang.String id)
           
 
Method Summary
 Node copy(NodeFactory nf)
          Produce a copy of this node using the given NodeFactory.
 void dump(CodeWriter w)
          Dump the AST node for debugging purposes.
 void equals(java.lang.String s)
           
 java.lang.String id()
          Get the name of the expression.
 Id id(java.lang.String id)
          Set the name of the expression.
 void prettyPrint(CodeWriter w, PrettyPrinter tr)
          Write the name to an output file.
 java.lang.String toString()
           
 
Methods inherited from class polyglot.ast.Node_c
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, error, error, exceptionCheck, exceptionCheckEnter, ext, ext, ext, ext, init, isDisambiguated, isTypeChecked, node, position, position, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, 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.Node
childExpectedType, del, del, 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, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Field Detail

id

protected java.lang.String id
Constructor Detail

Id_c

public Id_c(Position pos,
            java.lang.String id)
Method Detail

equals

public final void equals(java.lang.String s)

id

public java.lang.String id()
Get the name of the expression.

Specified by:
id in interface Id

id

public Id id(java.lang.String id)
Set the name of the expression.

Specified by:
id in interface Id

prettyPrint

public void prettyPrint(CodeWriter w,
                        PrettyPrinter tr)
Write the name to an output file.

Specified by:
prettyPrint in interface NodeOps
Overrides:
prettyPrint in class Node_c
Parameters:
w - The code writer to which to write.
tr - The pretty printer. This is not a visitor.

toString

public java.lang.String toString()
Overrides:
toString in class Node_c

dump

public void dump(CodeWriter w)
Description copied from interface: Node
Dump the AST node for debugging purposes.

Specified by:
dump in interface Node
Overrides:
dump in class Node_c

copy

public Node copy(NodeFactory nf)
Description copied from interface: NodeOps
Produce a copy of this node using the given NodeFactory.

Specified by:
copy in interface NodeOps
Overrides:
copy in class Node_c