| Package | org.as3commons.reflect |
| Class | public class ClassUtils |
| Inheritance | ClassUtils Object |
| Method | Defined By | ||
|---|---|---|---|
convertFullyQualifiedName(className:String):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.convertFullyQualifiedName() [static]
Converts the double colon (::) in a fully qualified class name to a dot (.)
| ClassUtils | ||
forInstance(instance:*, applicationDomain:ApplicationDomain = null):Class Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.forInstance() [static]
Returns a Class object that corresponds with the given
instance. | ClassUtils | ||
forName(name:String, applicationDomain:ApplicationDomain = null):Class Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.forName() [static]
Returns a Class object that corresponds with the given
name. | ClassUtils | ||
getFullyQualifiedImplementedInterfaceNames(clazz:Class, replaceColons:Boolean = false):Array Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getFullyQualifiedImplementedInterfaceNames() [static]
Returns an array of all fully qualified interface names that the
given class implements. | ClassUtils | ||
getFullyQualifiedName(clazz:Class, replaceColons:Boolean = false):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getFullyQualifiedName() [static]
Returns the fully qualified name of the given class. | ClassUtils | ||
getFullyQualifiedSuperClassName(clazz:Class, replaceColons:Boolean = false):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getFullyQualifiedSuperClassName() [static]
Returns the fully qualified name of the given class' superclass. | ClassUtils | ||
getImplementedInterfaceNames(clazz:Class):Array Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getImplementedInterfaceNames() [static]
Returns an array of all interface names that the given class implements. | ClassUtils | ||
getImplementedInterfaces(clazz:Class):Array Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getImplementedInterfaces() [static]
Returns an array of all interface names that the given class implements. | ClassUtils | ||
getName(clazz:Class):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getName() [static]
Returns the name of the given class. | ClassUtils | ||
getNameFromFullyQualifiedName(fullyQualifiedName:String):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getNameFromFullyQualifiedName() [static]
Returns the name of the class or interface, based on the given fully
qualified class or interface name. | ClassUtils | ||
getSuperClass(clazz:Class):Class Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getSuperClass() [static]
Returns the class that the passed in clazz extends. | ClassUtils | ||
getSuperClassName(clazz:Class):String Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.getSuperClassName() [static]
Returns the name of the given class' superclass. | ClassUtils | ||
isAssignableFrom(clazz1:Class, clazz2:Class):Boolean Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.isAssignableFrom() [static]
Determines if the class or interface represented by the clazz1 parameter is either the same as, or is
a superclass or superinterface of the clazz2 parameter. | ClassUtils | ||
isImplementationOf(clazz:Class, interfaze:Class):Boolean Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.isImplementationOf() [static]
Returns whether the passed in Class object implements
the given interface. | ClassUtils | ||
isInterface(clazz:Class):Boolean Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.isInterface() [static]
Returns whether the passed in Class object is an interface. | ClassUtils | ||
isSubclassOf(clazz:Class, parentClass:Class):Boolean Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.isSubclassOf() [static]
Returns whether the passed in Class object is a subclass of the
passed in parent Class. | ClassUtils | ||
newInstance(clazz:Class, args:Array = null):* Deprecated Since 1.1: Please Use org.as3commons.lang.ClassUtils.newInstance() [static]
Creates an instance of the given class and passes the arguments to
the constructor. | ClassUtils | ||
| convertFullyQualifiedName | () | method |
public static function convertFullyQualifiedName(className:String):StringConverts the double colon (::) in a fully qualified class name to a dot (.)
Parameters
className:String |
String |
| forInstance | () | method |
public static function forInstance(instance:*, applicationDomain:ApplicationDomain = null):ClassReturns a <codeph>Class</codeph> object that corresponds with the given instance. If no corresponding class was found, a <codeph>ClassNotFoundError</codeph> will be thrown.
Parameters
instance:* — the instance from which to return the class
| |
applicationDomain:ApplicationDomain (default = null) — the optional applicationdomain where the instance's class resides
|
Class — the <codeph>Class</codeph> that corresponds with the given instance
|
| forName | () | method |
public static function forName(name:String, applicationDomain:ApplicationDomain = null):ClassReturns a <codeph>Class</codeph> object that corresponds with the given name. If no correspoding class was found in the applicationdomain tree, a <codeph>ClassNotFoundError</codeph> will be thrown.
Parameters
name:String — the name from which to return the class
| |
applicationDomain:ApplicationDomain (default = null) — the optional applicationdomain where the instance's class resides
|
Class — the <codeph>Class</codeph> that corresponds with the given name
|
See also
| getFullyQualifiedImplementedInterfaceNames | () | method |
public static function getFullyQualifiedImplementedInterfaceNames(clazz:Class, replaceColons:Boolean = false):ArrayReturns an array of all fully qualified interface names that the given class implements.
Parameters
clazz:Class | |
replaceColons:Boolean (default = false) |
Array |
| getFullyQualifiedName | () | method |
public static function getFullyQualifiedName(clazz:Class, replaceColons:Boolean = false):StringReturns the fully qualified name of the given class.
Parameters
clazz:Class — the class to get the name from
| |
replaceColons:Boolean (default = false) — whether the double colons "::" should be replaced by a dot "."
the default is false
|
String — the fully qualified name of the class
|
| getFullyQualifiedSuperClassName | () | method |
public static function getFullyQualifiedSuperClassName(clazz:Class, replaceColons:Boolean = false):StringReturns the fully qualified name of the given class' superclass.
Parameters
clazz:Class — the class to get its superclass' name from
| |
replaceColons:Boolean (default = false) — whether the double colons "::" should be replaced by a dot "."
the default is false
|
String — the fully qualified name of the class' superclass
|
| getImplementedInterfaceNames | () | method |
public static function getImplementedInterfaceNames(clazz:Class):ArrayReturns an array of all interface names that the given class implements.
Parameters
clazz:Class |
Array |
| getImplementedInterfaces | () | method |
public static function getImplementedInterfaces(clazz:Class):ArrayReturns an array of all interface names that the given class implements.
Parameters
clazz:Class |
Array |
| getName | () | method |
public static function getName(clazz:Class):StringReturns the name of the given class.
Parameters
clazz:Class — the class to get the name from
|
String — the name of the class
|
| getNameFromFullyQualifiedName | () | method |
public static function getNameFromFullyQualifiedName(fullyQualifiedName:String):StringReturns the name of the class or interface, based on the given fully qualified class or interface name.
Parameters
fullyQualifiedName:String — the fully qualified name of the class or interface
|
String — the name of the class or interface
|
| getSuperClass | () | method |
public static function getSuperClass(clazz:Class):ClassReturns the class that the passed in clazz extends. If no super class was found, in case of Object, null is returned.
Parameters
clazz:Class — the class to get the super class from
|
Class |
| getSuperClassName | () | method |
public static function getSuperClassName(clazz:Class):StringReturns the name of the given class' superclass.
Parameters
clazz:Class — the class to get the name of its superclass' from
|
String — the name of the class' superclass
|
| isAssignableFrom | () | method |
public static function isAssignableFrom(clazz1:Class, clazz2:Class):BooleanDetermines if the class or interface represented by the clazz1 parameter is either the same as, or is a superclass or superinterface of the clazz2 parameter. It returns true if so; otherwise it returns false.
Parameters
clazz1:Class | |
clazz2:Class |
Boolean — the boolean value indicating whether objects of the type clazz2 can be assigned to objects of clazz1
|
| isImplementationOf | () | method |
public static function isImplementationOf(clazz:Class, interfaze:Class):BooleanReturns whether the passed in <codeph>Class</codeph> object implements the given interface.
Parameters
clazz:Class — the class to check for an implemented interface
| |
interfaze:Class — the interface that the clazz argument should implement
|
Boolean — true if the clazz object implements the given interface; false if not
|
| isInterface | () | method |
public static function isInterface(clazz:Class):BooleanReturns whether the passed in Class object is an interface.
Parameters
clazz:Class — the class to check
|
Boolean — true if the clazz is an interface; false if not
|
| isSubclassOf | () | method |
public static function isSubclassOf(clazz:Class, parentClass:Class):BooleanReturns whether the passed in Class object is a subclass of the passed in parent Class. To check if an interface extends another interface, use the isImplementationOf() method instead.
Parameters
clazz:Class | |
parentClass:Class |
Boolean |
| newInstance | () | method |
public static function newInstance(clazz:Class, args:Array = null):*Creates an instance of the given class and passes the arguments to the constructor. TODO find a generic solution for this. Currently we support constructors with a maximum of 10 arguments.
Parameters
clazz:Class — the class from which an instance will be created
| |
args:Array (default = null) — the arguments that need to be passed to the constructor
|
* |