|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents an ActionScript method definition within an ActionScript class or interface.
ASType.newMethod(String, Visibility, String)
Nested Class Summary | |
static class |
ASMethod.AccessorRole
Constants defined by this class denote whether a method is actually an acessor 'get' or 'set' function. |
Method Summary | |
void |
addParam(java.lang.String name,
java.lang.String type)
Adds a formal parameter to the list of parameters supported by this ActionScript method. |
ASMethod.AccessorRole |
getAccessorRole()
Returns on of ASMethod.AccessorRole.NORMAL_METHOD ,
ASMethod.AccessorRole.GETTER or ASMethod.AccessorRole.SETTER , with
NORMAL_METHOD being the default for newly synthesized methods. |
java.util.List |
getArgs()
Returns a list of the formal arguments accepted by this ActionScript method. |
java.lang.String |
getName()
Returns the name of this method. |
java.lang.String |
getType()
Returns the name of the return type of this ActionScript method, or null if it is untyped. |
Visibility |
getVisibility()
Returns a value representing any protection-against-access defined for this ActionScript method. |
boolean |
isStatic()
Returns true if this ActionScript method is static (i.e. |
void |
setAccessorRole(ASMethod.AccessorRole getter)
Allows the role of a method to be changed. |
void |
setStatic(boolean s)
Defines whether this ActionScript method is static or not. |
void |
setType(java.lang.String string)
Defines the name of the type of object returned by this ActionScript method. |
void |
setVisibility(Visibility visibility)
Defines the level of protection-against-external-access for this ActionScript method. |
Methods inherited from interface uk.co.badgersinfoil.metaas.StatementContainer |
addComment, addStmt, newDoWhile, newFor, newForIn, newIf, newSwitch, newWhile |
Methods inherited from interface uk.co.badgersinfoil.metaas.ASMember |
getDocComment, setDocComment, setName |
Method Detail |
public java.lang.String getName()
getName
in interface ASMember
public java.util.List getArgs()
addParam(String, String)
public java.lang.String getType()
getType
in interface ASMember
public void setType(java.lang.String string)
setType
in interface ASMember
public Visibility getVisibility()
getVisibility
in interface ASMember
public void setVisibility(Visibility visibility)
setVisibility
in interface ASMember
public boolean isStatic()
static
keyword).
isStatic
in interface ASMember
public void setStatic(boolean s)
setStatic
in interface ASMember
public void 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 untypedpublic ASMethod.AccessorRole getAccessorRole()
ASMethod.AccessorRole.NORMAL_METHOD
,
ASMethod.AccessorRole.GETTER
or ASMethod.AccessorRole.SETTER
, with
NORMAL_METHOD being the default for newly synthesized methods.
public void setAccessorRole(ASMethod.AccessorRole getter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |