软件包  jdk.nashorn.api.tree

Class SimpleTreeVisitorES6<R,​P>

  • 参数类型
    R - 此访问者方法的返回类型。 对于不需要返回结果的访问者,请使用Void
    P - 此访问者方法的附加参数的类型。 对于不需要其他参数的访问者,请使用Void
    实现的所有接口
    TreeVisitor<R,​P>

    @Deprecated(since="11",
                forRemoval=true)
    public class SimpleTreeVisitorES6<R,​P>
    extends SimpleTreeVisitorES5_1<R,​P>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
    ECMAScript版本6的TreeVisitor的简单实现。

    与ES 6语言结构相对应的访问方法通过调用传递当前访问者和附加参数的accept方法来遍历给定树的“组件”。

    对于在更高版本中引入的构造, visitUnknown而不是抛出UnknownTreeException

    本课程中的方法可以根据其一般合同进行覆盖。 请注意,使用@Override在具体子类中注释方法将有助于确保按预期覆盖方法。