| Package | org.spicefactory.lib.reflect |
| Class | public class ClassInfo |
| Inheritance | ClassInfo MetadataAware |
forName,
forClass or forInstance). ClassInfo instances are cached and rely on
the XML returned by flash.utils.describeType internally.
| Property | Defined by | ||
|---|---|---|---|
| applicationDomain : ApplicationDomain [read-only]
The ApplicationDomain this class belongs to.
| ClassInfo | ||
| name : String [read-only]
The fully qualified class name for this instance.
| ClassInfo | ||
| simpleName : String [read-only]
The non qualified class name for this instance.
| ClassInfo | ||
| Method | Defined by | ||
|---|---|---|---|
|
[static]
Returns an instance representing the specified class or interface.
| ClassInfo | ||
|
forInstance(instance:Object, domain:ApplicationDomain = null):ClassInfo
[static]
Returns an instance representing the class of the specified instance.
| ClassInfo | ||
|
[static]
Returns an instance representing the class or interface with the specified name.
| ClassInfo | ||
![]() |
getAllMetadata():Array
Returns all metadata tags for this type in no particular order.
| MetadataAware | |
|
getClass():Class
Returns the class this instance represents.
| ClassInfo | ||
|
Returns the constructor for this class.
| ClassInfo | ||
|
getInterfaces():Array
Returns all interfaces implemented by the class
represented by this ClassInfo instance.
| ClassInfo | ||
![]() |
getMetadata(type:Object):Array
Returns all metadata tags for the specified type for this element.
| MetadataAware | |
|
Returns the Method instance for the specified method name.
| ClassInfo | ||
|
getMethods():Array
Returns Method instances for all public, non-static methods of this class.
| ClassInfo | ||
|
getProperties():Array
Returns Property instances for all public, non-static properties of this class.
| ClassInfo | ||
|
getProperty(name:String):Property
Returns the Property instance for the specified property name.
| ClassInfo | ||
|
getStaticMethod(name:String):Method
Returns the Method instance for the specified method name.
| ClassInfo | ||
|
getStaticMethods():Array
Returns Method instances for all public, static methods of this class.
| ClassInfo | ||
|
getStaticProperties():Array
Returns Property instances for all public, static properties of this class.
| ClassInfo | ||
|
getStaticProperty(name:String):Property
Returns the Property instance for the specified property name.
| ClassInfo | ||
|
getSuperClass():Class
Returns the superclass of the class represented by this ClassInfo instance.
| ClassInfo | ||
|
getSuperClasses():Array
Returns all superclasses or superinterfaces of the class or interface
represented by this ClassInfo instance.
| ClassInfo | ||
|
isInterface():Boolean
Indicates whether this type is an interface.
| ClassInfo | ||
|
isType(c:Class):Boolean
Checks whether the class or interface represented by this ClassInfo instance
is a subclass or subinterface of the specified class.
| ClassInfo | ||
|
newInstance(constructorArgs:Array):Object
Creates a new instance of the class represented by this ClassInfo instance.
| ClassInfo | ||
| applicationDomain | property |
applicationDomain:ApplicationDomain [read-only]The ApplicationDomain this class belongs to. It will be used to load all dependent classes referenced by properties or methods of this class.
Implementation public function get applicationDomain():ApplicationDomain
| name | property |
name:String [read-only]The fully qualified class name for this instance.
Implementation public function get name():String
| simpleName | property |
simpleName:String [read-only]The non qualified class name for this instance.
Implementation public function get simpleName():String
| forClass | () | method |
public static function forClass(clazz:Class, domain:ApplicationDomain = null):ClassInfo
Returns an instance representing the specified class or interface.
If the optional domain parameter is omitted ApplicationDomain.currentDomain
will be used.
clazz:Class — the class or interface to reflect on
|
|
domain:ApplicationDomain (default = null) — the ApplicationDomain the specified class was loaded from
|
ClassInfo —
an instance representing the specified class or interface
|
| forInstance | () | method |
public static function forInstance(instance:Object, domain:ApplicationDomain = null):ClassInfo
Returns an instance representing the class of the specified instance.
If the optional domain parameter is omitted ApplicationDomain.currentDomain
will be used.
instance:Object — the instance to return the ClassInfo for
|
|
domain:ApplicationDomain (default = null) |
ClassInfo —
an instance representing the class of the specified instance
|
| forName | () | method |
public static function forName(name:String, domain:ApplicationDomain = null):ClassInfo
Returns an instance representing the class or interface with the specified name.
If the optional domain parameter is omitted ApplicationDomain.currentDomain
will be used.
name:String — the fully qualified name of the class or interface
|
|
domain:ApplicationDomain (default = null) — the ApplicationDomain to load the class from
|
ClassInfo —
an instance representing the class or interface with the specified name
|
— if the class with the specified name does not exist
|
| getClass | () | method |
public function getClass():ClassReturns the class this instance represents.
ReturnsClass — the class this instance represents
|
| getConstructor | () | method |
public function getConstructor():ConstructorReturns the constructor for this class. This method will return null for interfaces.
ReturnsConstructor —
the constructor for this class
|
| getInterfaces | () | method |
public function getInterfaces():ArrayReturns all interfaces implemented by the class represented by this ClassInfo instance.
ReturnsArray — all interfaces implemented by the class
represented by this ClassInfo instance
|
| getMethod | () | method |
public function getMethod(name:String):MethodReturns the Method instance for the specified method name. The method must be public, non-static and may be declared in this class or in one of its superclasses or superinterfaces.
Parametersname:String — the name of the method
|
Method —
the Method instance for the specified method name or null if no such method exists
|
| getMethods | () | method |
public function getMethods():ArrayReturns Method instances for all public, non-static methods of this class. Included are all methods declared in this class or in one of its superclasses or superinterfaces.
ReturnsArray — Method instances for all public, non-static methods of this class
|
| getProperties | () | method |
public function getProperties():ArrayReturns Property instances for all public, non-static properties of this class. Included are all properties declared in this class or in one of its superclasses or superinterfaces with var, const or implicit getter/setter functions.
ReturnsArray — Property instances for all public, non-static properties of this class
|
| getProperty | () | method |
public function getProperty(name:String):PropertyReturns the Property instance for the specified property name. The property may be declared in this class or in one of its superclasses or superinterfaces. The property must be public and non-static and may have been declared with var, const or implicit getter/setter functions.
Parametersname:String — the name of the property
|
Property —
the Property instance for the specified property name or null if no such property exists
|
| getStaticMethod | () | method |
public function getStaticMethod(name:String):MethodReturns the Method instance for the specified method name. The method must be public, static and must be declared in this class.
Parametersname:String — the name of the static method
|
Method —
the Method instance for the specified method name or null if no such method exists
|
| getStaticMethods | () | method |
public function getStaticMethods():ArrayReturns Method instances for all public, static methods of this class. Included are all static methods declared in this class. Method instances for all public, static methods of this class
ReturnsArray |
| getStaticProperties | () | method |
public function getStaticProperties():ArrayReturns Property instances for all public, static properties of this class. Included are all static properties declared in this class with var, const or implicit getter/setter functions.
ReturnsArray — Property instances for all public, static properties of this class
|
| getStaticProperty | () | method |
public function getStaticProperty(name:String):PropertyReturns the Property instance for the specified property name. The property must be public and static and may have been declared with var, const or implicit getter/setter functions. Static properties of superclasses or superinterfaces are not included.
Parametersname:String — the name of the static property
|
Property —
the Property instance for the specified property name or null if no such property exists
|
| getSuperClass | () | method |
public function getSuperClass():ClassReturns the superclass of the class represented by this ClassInfo instance.
ReturnsClass — the superclass of the class represented by this ClassInfo instance
|
| getSuperClasses | () | method |
public function getSuperClasses():ArrayReturns all superclasses or superinterfaces of the class or interface represented by this ClassInfo instance. The first element in the Array is always the immediate superclass.
ReturnsArray — all superclasses or superinterfaces of the class or interface
represented by this ClassInfo instance
|
| isInterface | () | method |
public function isInterface():BooleanIndicates whether this type is an interface.
ReturnsBoolean — true if this type is an interface
|
| isType | () | method |
public function isType(c:Class):BooleanChecks whether the class or interface represented by this ClassInfo instance is a subclass or subinterface of the specified class.
Parametersc:Class |
Boolean — true if the class or interface represented by this ClassInfo instance
is a subclass or subinterface of the specified class
|
| newInstance | () | method |
public function newInstance(constructorArgs:Array):Object
Creates a new instance of the class represented by this ClassInfo instance.
This is just a shortcut for ClassInfo.getConstructor().newInstance().
constructorArgs:Array — the argumenst to pass to the constructor
|
Object — a new instance of the class represented by this ClassInfo instance
|