TypeInfo represents a type a ActionScript type, that is either a class
or an interface.
Note that it is not possible right now to distinguish between classes and interfaces at run-time. Therefore are both classes and interfaces represented by ClassInfo instances. This is going to change as soon is a differentiation is possible.
public function getType(Void):FunctionReturns the type this instance represents.
the type represented by this instance
public function getSuperType(Void):TypeInfoReturns the super type of this type.
Talking of classes the super-type is the class's super-class, that means the class it extends and with interfaces it is the interface's super-interface, that means the interface it extends.
A super-type is not an implemented interface. Note the difference between extending and implementing.
the super types of this type
public function getPackage(Void):PackageInfoReturns the package this type is a member of.
the package this type is a member of
public function hasMethod(methodName:String, filterStaticMethods:Boolean):Boolean
Returns whether this type or any super-type has a method with the passed-in
methodName.
Static methods are not filtered by default. This means filterStaticMethods
is by default set to false.
methodName | the name of the method to search for |
filterStaticMethods | (optional) determines whether static methods are filtered, this means excluded from the search |
true if the method exists else false
public function getMethodsByFlag(filterSuperTypes:Boolean):Array
Returns an array containing the methods represented by MethodInfo instances
this type declares and maybe the ones of the super types.
The super types' methods are included if you pass-in false, null
or undefined and excluded/filtered if you pass-in true. This means
super-types are by default included.
Note that methods of interfaces cannot be evaluated at run-time. They thus have no methods for the Reflection API.
filterSuperTypes | (optional) determines whether to filter/exclude the super types' methods |
an array containing the methods represented by MethodInfo instances
public function getMethodsByFilter(methodFilter:TypeMemberFilter):Array
Returns an array containing the methods represented by MethodInfo instances
this type and super types' declare that are not filtered/excluded.
The TypeMemberFilter.filter method of the passed-in methodFilter
is invoked for every method to determine whether it shall be contained in the
result.
If the passed-in methodFilter is null or undefined the
result of an invocation of the getMethodsByFlag method with argument
false will be returned.
Note that methods of interfaces cannot be evaluated at run-time. They thus have no methods for the Reflection API.
methodFilter | the filter that filters unwanted methods out |
an array containing the remaining methods represented by MethodInfo
instances
public function getMethodByName(methodName:String):MethodInfo
Returns the method info corresponding to the passed-in methodName.
null will be returned if:
methodName is null or undefined.Note that methods of interfaces cannot be evaluated at run-time. They thus have no methods for the Reflection API.
methodName | the name of the method you wanna obtain |
the method info correspoinding to the passed-in methodName
public function getMethodByMethod(concreteMethod:Function):MethodInfo
Returns the method info corresponding to the passed-in concreteMethod.
null will be returned if:
concreteMethod is null or undefined.Note that methods of interfaces cannot be evaluated at run-time. They thus have no methods for the Reflection API.
concreteMethod | the method you wanna obtain the corresponding method info for |
the method info correspoinding to the passed-in concreteMethod