class FindExportableNodes extends NodeTraversal.AbstractPostOrderCallback
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FindExportableNodes.Mode |
Modifier and Type | Field and Description |
---|---|
private boolean |
allowLocalExports |
private AbstractCompiler |
compiler |
(package private) static DiagnosticType |
EXPORT_ANNOTATION_NOT_ALLOWED |
private java.util.LinkedHashMap<java.lang.String,Node> |
exports
The set of node with @export annotations and their associated fully qualified names
|
private java.util.LinkedHashSet<java.lang.String> |
localExports
The set of property names associated with @export annotations that do not have
an associated fully qualified name.
|
(package private) static DiagnosticType |
NON_GLOBAL_ERROR |
Constructor and Description |
---|
FindExportableNodes(AbstractCompiler compiler,
boolean allowLocalExports) |
Modifier and Type | Method and Description |
---|---|
(package private) java.util.LinkedHashMap<java.lang.String,Node> |
getExports() |
(package private) java.util.LinkedHashSet<java.lang.String> |
getLocalExports() |
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraverse
static final DiagnosticType NON_GLOBAL_ERROR
static final DiagnosticType EXPORT_ANNOTATION_NOT_ALLOWED
private final AbstractCompiler compiler
private final java.util.LinkedHashMap<java.lang.String,Node> exports
private final java.util.LinkedHashSet<java.lang.String> localExports
private final boolean allowLocalExports
FindExportableNodes(AbstractCompiler compiler, boolean allowLocalExports)
public void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
).
Implementations can have side effects (e.g. modifying the parse tree).
java.util.LinkedHashMap<java.lang.String,Node> getExports()
java.util.LinkedHashSet<java.lang.String> getLocalExports()