public class SourceCollection_c extends Node_c implements SourceCollection
SourceCollection
represents a collection of source files.
This node should be used only during AST rewriting, just before code
generation in order to generate multiple target files from a single
AST.Modifier and Type | Field and Description |
---|---|
protected java.util.List<SourceFile> |
sources |
Constructor and Description |
---|
SourceCollection_c(Position pos,
java.util.List<SourceFile> sources) |
SourceCollection_c(Position pos,
java.util.List<SourceFile> sources,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
Node |
copy(NodeFactory nf)
Produce a copy of this node using the given NodeFactory.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
protected <N extends SourceCollection_c> |
reconstruct(N n,
java.util.List<SourceFile> sources)
Reconstruct the collection.
|
java.util.List<SourceFile> |
sources()
List of source files in the collection.
|
SourceCollection |
sources(java.util.List<SourceFile> sources)
Set the list of source files in the collection.
|
protected <N extends SourceCollection_c> |
sources(N n,
java.util.List<SourceFile> sources) |
java.lang.String |
toString() |
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheck, exceptionCheckEnter, ext, ext, ext, ext, extRewrite, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected java.util.List<SourceFile> sources
public SourceCollection_c(Position pos, java.util.List<SourceFile> sources)
public SourceCollection_c(Position pos, java.util.List<SourceFile> sources, Ext ext)
public java.util.List<SourceFile> sources()
SourceCollection
sources
in interface SourceCollection
SourceFile
.public SourceCollection sources(java.util.List<SourceFile> sources)
SourceCollection
sources
in interface SourceCollection
sources
- A list of SourceFile
.protected <N extends SourceCollection_c> N sources(N n, java.util.List<SourceFile> sources)
protected <N extends SourceCollection_c> N reconstruct(N n, java.util.List<SourceFile> sources)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Node_c
v
- The visitor that will traverse/rewrite the AST.this
.public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Node_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.