polyglot.ext.jl.ast
Class SourceCollection_c
java.lang.Object
polyglot.ext.jl.ast.Node_c
polyglot.ext.jl.ast.SourceCollection_c
- All Implemented Interfaces:
- java.lang.Cloneable, JL, Node, NodeOps, SourceCollection, Copy
public class SourceCollection_c
- extends Node_c
- implements SourceCollection
A SourceCollection
represents a collection of source files.
Field Summary |
protected java.util.List |
sources
|
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, translate, typeCheck, 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.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, throwTypes, translate, typeCheck, typeCheckEnter |
Methods inherited from interface polyglot.util.Copy |
copy |
sources
protected java.util.List sources
SourceCollection_c
public SourceCollection_c(Position pos,
java.util.List sources)
toString
public java.lang.String toString()
- Overrides:
toString
in class Node_c
sources
public java.util.List sources()
- Get the source files.
- Specified by:
sources
in interface SourceCollection
- Returns:
- A list of
SourceFile
.
sources
public SourceCollection sources(java.util.List sources)
- Set the statements of the block.
- Specified by:
sources
in interface SourceCollection
- Parameters:
sources
- A list of SourceFile
.
reconstruct
protected SourceCollection_c reconstruct(java.util.List sources)
- Reconstruct the collection.
visitChildren
public Node visitChildren(NodeVisitor v)
- Visit the children of the block.
- Specified by:
visitChildren
in interface NodeOps
- Overrides:
visitChildren
in class Node_c
- Parameters:
v
- The visitor that will traverse/rewrite the AST.
- Returns:
- A new AST if a change was made, or
this
.
prettyPrint
public void prettyPrint(CodeWriter w,
PrettyPrinter tr)
- Write the source files 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.