软件包  jdk.nashorn.api.tree

Interface FunctionDeclarationTree

  • All Superinterfaces:
    StatementTree

    @Deprecated(since="11",
                forRemoval=true)
    public interface FunctionDeclarationTree
    extends StatementTree
    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.
    function declaration的树节点。 例如:
      function name
          ( parameters )
          body 
      function* name
          ( parameters )
          body 
    从以下版本开始:
    9
    • 嵌套类汇总

      • Nested classes/interfaces declared in interface jdk.nashorn.api.tree.

        Tree.Kind
    • 方法摘要

      所有方法  实例方法 抽象方法  弃用的方法 
      变量和类型 方法 描述
      BlockTree getBody()
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      返回此函数的代码体。
      IdentifierTree getName()
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      返回正在声明的函数的名称。
      List<? extends ExpressionTree> getParameters()
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      返回此函数的参数。
      boolean isGenerator()
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      这是发电机功能吗?
      boolean isStrict()
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      这是一个严格的功能吗?
    • 方法详细信息

      • getName

        IdentifierTree getName()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回正在声明的函数的名称。
        结果
        命名声明的函数
      • getParameters

        List<? extends ExpressionTree> getParameters()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此函数的参数。
        结果
        参数列表
      • getBody

        BlockTree getBody()
        Deprecated, for removal: This API element is subject to removal in a future version.
        返回此函数的代码体。
        结果
        代码体
      • isStrict

        boolean isStrict()
        Deprecated, for removal: This API element is subject to removal in a future version.
        这是一个严格的功能吗?
        结果
        如果此功能严格,则为true
      • isGenerator

        boolean isGenerator()
        Deprecated, for removal: This API element is subject to removal in a future version.
        这是发电机功能吗?
        结果
        如果这是生成器函数,则为true