public interface SourceFile extends Node
SourceFile
is an immutable representations of a Java
language source file. It consists of a package name, a list of
Import
s, and a list of GlobalDecl
s.Modifier and Type | Method and Description |
---|---|
java.util.List<TopLevelDecl> |
decls()
Get the source's top-level declarations.
|
SourceFile |
decls(java.util.List<TopLevelDecl> decls)
Set the source's top-level declarations.
|
java.util.List<Import> |
imports()
Get the source's declared imports.
|
SourceFile |
imports(java.util.List<Import> imports)
Set the source's declared imports.
|
ImportTable |
importTable()
Get the source's import table.
|
SourceFile |
importTable(ImportTable importTable)
Set the source's import table.
|
PackageNode |
package_()
Get the source's declared package.
|
SourceFile |
package_(PackageNode package_)
Set the source's declared package.
|
Source |
source()
Get the source file.
|
SourceFile |
source(Source source)
Set the source file.
|
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
PackageNode package_()
SourceFile package_(PackageNode package_)
java.util.List<Import> imports()
Import
.SourceFile imports(java.util.List<Import> imports)
imports
- A list of Import
.java.util.List<TopLevelDecl> decls()
TopLevelDecl
.SourceFile decls(java.util.List<TopLevelDecl> decls)
decls
- A list of TopLevelDecl
.ImportTable importTable()
SourceFile importTable(ImportTable importTable)
Source source()
SourceFile source(Source source)