Access keys

TypeInfo

Kind of class: interface
Inherits from: PackageMemberInfo < MemberInfo < BasicInterface
Implemented by:
Author: Simon Wacker
Classpath: org.as2lib.env.reflect.TypeInfo
File last modified: Saturday, 09 April 2005, 12:52:36
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.

Summary

Instance methods

getMethodByMethod

function getMethodByMethod (
concreteMethod:Function) : MethodInfo
Returns the method info corresponding to the passed-in concreteMethod.

null will be returned if:

  • The passed-in concreteMethod is null or undefined.
  • The method does not exist in the represented type or any super-type.

Note that methods of interfaces cannot be evaluated at run-time. They thus
have no methods for the Reflection API.

Parameters:
concreteMethod:
the method you wanna obtain the corresponding method info
for
Returns:
the method info correspoinding to the passed-in concreteMethod

getMethodByName

function getMethodByName (
methodName:String) : MethodInfo
Returns the method info corresponding to the passed-in methodName.

null will be returned if:

  • The passed-in methodName is null or undefined.
  • The method does not exist in the represented type or any super-type.

Note that methods of interfaces cannot be evaluated at run-time. They thus
have no methods for the Reflection API.

Parameters:
methodName:
the name of the method you wanna obtain
Returns:
the method info correspoinding to the passed-in methodName

getMethodsByFilter

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.

Parameters:
methodFilter:
the filter that filters unwanted methods out
Returns:
an array containing the remaining methods represented by MethodInfo
instances

getMethodsByFlag

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.

Parameters:
filterSuperTypes:
(optional) determines whether to filter/exclude the super
types' methods
Returns:
an array containing the methods represented by MethodInfo instances

getPackage

function getPackage (
Void) : PackageInfo
Returns the package this type is a member of.
Returns:
the package this type is a member of

getSuperType

function getSuperType (
Void) : TypeInfo
Returns 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.

Returns:
the super types of this type

getType

function getType (
Void) : Function
Returns the type this instance represents.
Returns:
the type represented by this instance

hasMethod

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.

Parameters:
methodName :
the name of the method to search for
filterStaticMethods:
(optional) determines whether static methods are
filtered, this means excluded from the search
Returns:
true if the method exists else false