Class SimpleTreeVisitorES6<R,P>
- java.lang.Object
-
- jdk.nashorn.api.tree.SimpleTreeVisitorES5_1<R,P>
-
- jdk.nashorn.api.tree.SimpleTreeVisitorES6<R,P>
- Type Parameters:
-
R
- the return type of this visitor's methods. UseVoid
for visitors that do not need to return results. -
P
- the type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameter.
- All Implemented Interfaces:
TreeVisitor<R,P>
@Deprecated(since="11", forRemoval=true) public class SimpleTreeVisitorES6<R,P> extends SimpleTreeVisitorES5_1<R,P>
A simple implementation of the TreeVisitor for ECMAScript edition 6.
The visit methods corresponding to ES 6 language constructs walk the "components" of the given tree by calling accept method passing the current visitor and the additional parameter.
For constructs introduced in later versions, visitUnknown
is called instead which throws UnknownTreeException
.
Methods in this class may be overridden subject to their general contract. Note that annotating methods in concrete subclasses with @Override
will help ensure that methods are overridden as intended.
Constructors
Constructor | Description |
---|---|
SimpleTreeVisitorES6() | Deprecated, for removal: This API element is subject to removal in a future version. |
Methods
Modifier and Type | Method | Description |
---|---|---|
R | visitClassDeclaration(ClassDeclarationTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit class statement tree. |
R | visitClassExpression(ClassExpressionTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit class expression tree. |
R | visitExportEntry(ExportEntryTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit Module ExportEntry tree. |
R | visitForOfLoop(ForOfLoopTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit for..of statement tree. |
R | visitImportEntry(ImportEntryTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit Module ImportEntry tree. |
R | visitModule(ModuleTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit Module tree. |
R | visitSpread(SpreadTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit 'spread' expression tree. |
R | visitTemplateLiteral(TemplateLiteralTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit template literal tree. |
R | visitYield(YieldTree node,
P p) | Deprecated, for removal: This API element is subject to removal in a future version. Visit 'yield' expression tree. |
Methods declared in class jdk.nashorn.api.tree.SimpleTreeVisitorES5_1
visitUnknown
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface jdk.nashorn.api.tree.TreeVisitor
visitArrayAccess, visitArrayLiteral, visitAssignment, visitBinary, visitBlock, visitBreak, visitCase, visitCatch, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDebugger, visitDoWhileLoop, visitEmptyStatement, visitErroneous, visitExpressionStatement, visitForInLoop, visitForLoop, visitFunctionCall, visitFunctionDeclaration, visitFunctionExpression, visitIdentifier, visitIf, visitInstanceOf, visitLabeledStatement, visitLiteral, visitMemberSelect, visitNew, visitObjectLiteral, visitParenthesized, visitProperty, visitRegExpLiteral, visitReturn, visitSwitch, visitThrow, visitTry, visitUnary, visitVariable, visitWhileLoop, visitWith
Constructors
SimpleTreeVisitorES6
public SimpleTreeVisitorES6()
Methods
visitModule
public R visitModule(ModuleTree node, P p)
Visit Module tree.
- Specified by:
-
visitModule
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitModule
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitExportEntry
public R visitExportEntry(ExportEntryTree node, P p)
Visit Module ExportEntry tree.
- Specified by:
-
visitExportEntry
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitExportEntry
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitImportEntry
public R visitImportEntry(ImportEntryTree node, P p)
Visit Module ImportEntry tree.
- Specified by:
-
visitImportEntry
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitImportEntry
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitClassDeclaration
public R visitClassDeclaration(ClassDeclarationTree node, P p)
Visit class statement tree.
- Specified by:
-
visitClassDeclaration
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitClassDeclaration
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitClassExpression
public R visitClassExpression(ClassExpressionTree node, P p)
Visit class expression tree.
- Specified by:
-
visitClassExpression
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitClassExpression
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitForOfLoop
public R visitForOfLoop(ForOfLoopTree node, P p)
Visit for..of statement tree.
- Specified by:
-
visitForOfLoop
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitForOfLoop
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitYield
public R visitYield(YieldTree node, P p)
Visit 'yield' expression tree.
- Specified by:
-
visitYield
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitYield
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitSpread
public R visitSpread(SpreadTree node, P p)
Visit 'spread' expression tree.
- Specified by:
-
visitSpread
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitSpread
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
visitTemplateLiteral
public R visitTemplateLiteral(TemplateLiteralTree node, P p)
Visit template literal tree.
- Specified by:
-
visitTemplateLiteral
in interfaceTreeVisitor<R,P>
- Overrides:
-
visitTemplateLiteral
in classSimpleTreeVisitorES5_1<R,P>
- Parameters:
-
node
- node being visited -
p
- extra parameter passed to the visitor - Returns:
- value from the visitor
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.scripting.nashorn/jdk/nashorn/api/tree/SimpleTreeVisitorES6.html