|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FunctionCommon
Common interface for ASMethod
and ASFunctionExpression
.
Method Summary | |
---|---|
ASArg |
addParam(java.lang.String name,
java.lang.String type)
Adds a formal parameter to the list of parameters supported by this ActionScript method. |
ASArg |
addRestParam(java.lang.String name)
Adds a 'rest' parameter to the list of parameters supported by this ActionScript method. |
java.util.List |
getArgs()
Returns a list of the formal arguments accepted by this ActionScript method. |
java.lang.String |
getType()
Returns the name of the return type of this ActionScript method, or null if it is untyped. |
ASArg |
removeParam(java.lang.String string)
Removes the named parameter from this ActionScript methods formal parameter list. |
void |
setType(java.lang.String string)
Defines the name of the type of object returned by this ActionScript method. |
Method Detail |
---|
java.util.List getArgs()
addParam(String, String)
java.lang.String getType()
void setType(java.lang.String string)
ASArg addParam(java.lang.String name, java.lang.String type)
name
- The name for the parametertype
- The type for the parameter, or null if the parameter is
to be untyped
addRestParam(String)
ASArg addRestParam(java.lang.String name)
e.g. The java code,
ASMethod meth = class.newMethod("test", Visibility.PUBLIC, "void"); meth.addRestParam("foo");
will result in ActionScript code like,
public function test(...foo):void { }
To create an anonymous 'rest' parameter, pass the name "..." (this name can also be passed to removeParam() to remove an anonymous rest parameter).
addParam(String,String)
ASArg removeParam(java.lang.String string)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |