26 package jdk.nashorn.api.tree; 27 28 import java.util.List; 29 30 /** 31 * A tree node for a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions">function declaration</a>. 32 * 33 * For example: 34 * <pre> 35 * <em>function</em> <em>name</em> 36 * ( <em>parameters</em> ) 37 * <em>body</em> 38 * </pre> 39 * 40 * <pre> 41 * <em>function*</em> <em>name</em> 42 * ( <em>parameters</em> ) 43 * <em>body</em> 44 * </pre> 45 * 46 * @since 9 47 */ 48 public interface FunctionDeclarationTree extends StatementTree { 49 /** 50 * Returns the name of the function being declared. 51 * 52 * @return name the function declared 53 */ 54 IdentifierTree getName(); 55 56 /** 57 * Returns the parameters of this function. 58 * 59 * @return the list of parameters 60 */ 61 List<? extends ExpressionTree> getParameters(); 62 63 /** 64 * Returns the body of code of this function. 65 * 66 * @return the body of code 67 */ | 26 package jdk.nashorn.api.tree; 27 28 import java.util.List; 29 30 /** 31 * A tree node for a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions">function declaration</a>. 32 * 33 * For example: 34 * <pre> 35 * <em>function</em> <em>name</em> 36 * ( <em>parameters</em> ) 37 * <em>body</em> 38 * </pre> 39 * 40 * <pre> 41 * <em>function*</em> <em>name</em> 42 * ( <em>parameters</em> ) 43 * <em>body</em> 44 * </pre> 45 * 46 * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool 47 * are deprecated with the intent to remove them in a future release. 48 * 49 * @since 9 50 */ 51 @Deprecated(since="11", forRemoval=true) 52 public interface FunctionDeclarationTree extends StatementTree { 53 /** 54 * Returns the name of the function being declared. 55 * 56 * @return name the function declared 57 */ 58 IdentifierTree getName(); 59 60 /** 61 * Returns the parameters of this function. 62 * 63 * @return the list of parameters 64 */ 65 List<? extends ExpressionTree> getParameters(); 66 67 /** 68 * Returns the body of code of this function. 69 * 70 * @return the body of code 71 */ |