< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/FunctionNode.java

Print this page

        

*** 1024,1033 **** --- 1024,1041 ---- public List<IdentNode> getParameters() { return Collections.unmodifiableList(parameters); } /** + * Return the number of parameters to this function + * @return the number of parameters + */ + public int getNumOfParams() { + return parameters.size(); + } + + /** * Returns the identifier for a named parameter at the specified position in this function's parameter list. * @param index the parameter's position. * @return the identifier for the requested named parameter. * @throws IndexOutOfBoundsException if the index is invalid. */
< prev index next >