uk.co.badgersinfoil.metaas
Interface ASType

All Known Subinterfaces:
ASClassType, ASInterfaceType

public interface ASType

Superinterface for ASClassType and ASInterfaceType.


Method Summary
 java.util.List getMethods()
          Returns a list of ASMethod objects.
 java.lang.String getName()
          Returns the name of this class or interface, excluding any package prefix.
 ASMethod newMethod(java.lang.String name, ASProtection protection, java.lang.String returnType)
          Creates a new ActionScript method definition, adds it to the list of methods supported by this tyoe, and returns a reference to the method.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of this class or interface, excluding any package prefix. TODO: maybe the prefix should be included, and the getPackage() in CompilationUnit should be dropped, to mask the diff between AS2 and AS3.


getMethods

public java.util.List getMethods()
Returns a list of ASMethod objects. Don't attempt to change the type by modifying the list.


newMethod

public ASMethod newMethod(java.lang.String name,
                          ASProtection protection,
                          java.lang.String returnType)
Creates a new ActionScript method definition, adds it to the list of methods supported by this tyoe, and returns a reference to the method.

Parameters:
name - The name of the method to be created
protection - an object representing the alloed access to the new method by other ActionScript code
returnType - The name of this method's return type, or null, if this method's return value is untyped.