-
- All Superinterfaces:
StatementTree
,Tree
@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.A tree node for a function declaration. For example:function name ( parameters ) body
function* name ( parameters ) body
- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description BlockTree
getBody()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the body of code of this function.IdentifierTree
getName()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the function being declared.List<? extends ExpressionTree>
getParameters()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the parameters of this function.boolean
isGenerator()
Deprecated, for removal: This API element is subject to removal in a future version.Is this a generator function?boolean
isStrict()
Deprecated, for removal: This API element is subject to removal in a future version.Is this a strict function?-
Methods declared in interface jdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition
-
-
-
-
Method Detail
-
getName
IdentifierTree getName()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the function being declared.- Returns:
- name the function declared
-
getParameters
List<? extends ExpressionTree> getParameters()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the parameters of this function.- Returns:
- the list of parameters
-
getBody
BlockTree getBody()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the body of code of this function.- Returns:
- the body of code
-
isStrict
boolean isStrict()
Deprecated, for removal: This API element is subject to removal in a future version.Is this a strict function?- Returns:
- true if this function is strict
-
isGenerator
boolean isGenerator()
Deprecated, for removal: This API element is subject to removal in a future version.Is this a generator function?- Returns:
- true if this is a generator function
-
-