polyglot.ext.jl.ast
Class PackageNode_c

java.lang.Object
  extended by polyglot.ext.jl.ast.Node_c
      extended by polyglot.ext.jl.ast.PackageNode_c
All Implemented Interfaces:
java.lang.Cloneable, JL, Node, NodeOps, PackageNode, Prefix, QualifierNode, Copy

public class PackageNode_c
extends Node_c
implements PackageNode

A PackageNode is the syntactic representation of a Java package within the abstract syntax tree.


Field Summary
protected  Package package_
           
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Constructor Summary
PackageNode_c(Position pos, Package package_)
           
 
Method Summary
 Package package_()
          Get the package.
 PackageNode package_(Package package_)
          Set the package.
 void prettyPrint(CodeWriter w, PrettyPrinter tr)
          Write the package name to an output file.
 Qualifier qualifier()
          Get the package as a qualifier.
 java.lang.String toString()
           
 void translate(CodeWriter w, Translator tr)
          Translate the AST using the given CodeWriter.
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, 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
 

Field Detail

package_

protected Package package_
Constructor Detail

PackageNode_c

public PackageNode_c(Position pos,
                     Package package_)
Method Detail

qualifier

public Qualifier qualifier()
Get the package as a qualifier.

Specified by:
qualifier in interface QualifierNode

package_

public Package package_()
Get the package.

Specified by:
package_ in interface PackageNode

package_

public PackageNode package_(Package package_)
Set the package.

Specified by:
package_ in interface PackageNode

prettyPrint

public void prettyPrint(CodeWriter w,
                        PrettyPrinter tr)
Write the package 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.

translate

public void translate(CodeWriter w,
                      Translator tr)
Description copied from class: Node_c
Translate the AST using the given CodeWriter.

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

toString

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