|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.rhino.jstype.FunctionParamBuilder
public class FunctionParamBuilder
A builder for the Rhino Node representing Function parameters.
Constructor Summary | |
---|---|
FunctionParamBuilder(JSTypeRegistry registry)
|
Method Summary | |
---|---|
boolean |
addOptionalParams(JSType... types)
Add optional parameters of the given type to the end of the param list. |
boolean |
addRequiredParams(JSType... types)
Add parameters of the given type to the end of the param list. |
boolean |
addVarArgs(JSType type)
Add variable arguments to the end of the parameter list. |
Node |
build()
|
boolean |
hasVarArgs()
|
Node |
newOptionalParameterFromNode(Node n)
Copies the parameter specification from the given node, but makes sure it's optional. |
Node |
newParameterFromNode(Node n)
Copies the parameter specification from the given node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FunctionParamBuilder(JSTypeRegistry registry)
Method Detail |
---|
public boolean addRequiredParams(JSType... types)
public boolean addOptionalParams(JSType... types)
types
- Types for each optional parameter. The builder will make them
undefineable.
public boolean addVarArgs(JSType type)
public Node newParameterFromNode(Node n)
public Node newOptionalParameterFromNode(Node n)
public Node build()
public boolean hasVarArgs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |