| Property | Defined by | ||
|---|---|---|---|
| systemDomain : ApplicationDomain [static][read-only]
The Flash VM system application domain.
| ClassUtil | ||
| Method | Defined by | ||
|---|---|---|---|
|
describeClass(clazz:Class):XML
[static]
This method returns the XML description of the supplied class parameter.
| ClassUtil | ||
|
extractPackageName(name:String):String
[static]
Returns the package name of the supplied class name parameter.
| ClassUtil | ||
|
extractSimpleName(name:String):String
[static]
Returns the simple (without the package part) name of the supplied
class name parameter.
| ClassUtil | ||
|
forInstance(o:*, domain:ApplicationDomain = null):Class
[static]
Returns the
Class of the supplied instance parameter. | ClassUtil | ||
|
forName(name:String, domain:ApplicationDomain = null):Class
[static]
Returns the
Class denoted by the name parameter, in the optional application
domain parameter. | ClassUtil | ||
|
getName(clazz:Class):String
[static]
Returns the fully qualified name of the supplied
Class parameter
in the form of "path.to::MyClass". | ClassUtil | ||
|
getPackageName(clazz:Class):String
[static]
Returns the package name of the supplied
Class parameter. | ClassUtil | ||
|
getSimpleName(clazz:Class):String
[static]
Returns the simple (without the package part) name of the supplied
Class parameter. | ClassUtil | ||
|
getUnqualifiedClassName(o:Object):String
[static]
Get the unqualified (simple) class name of the object passed as
a parameter.
| ClassUtil | ||
|
hasDefinition(name:String, domain:ApplicationDomain = null):Boolean
[static]
Test if a class name exists in the supplied domain or in the global system domain.
| ClassUtil | ||
|
isAnnotatedWith(o:*, annotationName:String):Boolean
[static]
Tests if the supplied object class is annotated with a given annotation name.
| ClassUtil | ||
|
isFlashClass(clazz:Class):Boolean
[static]
Tests if the supplied clazz parameter is a Flash class, ie.
| ClassUtil | ||
|
isMathClass(clazz:Class):Boolean
[static]
Tests if the supplied clazz parameter is a GraniteDS Math class, ie.
| ClassUtil | ||
|
isMxClass(clazz:Class):Boolean
[static]
Tests if the supplied clazz parameter is a Flex class, ie.
| ClassUtil | ||
|
isTopLevel(clazz:Class):Boolean
[static]
Tests if the supplied clazz parameter is a Top Level class defined in the
Flash 10 VM (including
Vector). | ClassUtil | ||
|
isVector(o:*):Boolean
[static]
Tests if the supplied o parameter is an instance of the Flash 10 Vector class.
| ClassUtil | ||
|
parseQName(name:String, upperPolicy:Boolean = true):Array
[static]
Split a name into a namespace prefix and a value.
| ClassUtil | ||
| systemDomain | property |
systemDomain:ApplicationDomain [read-only]The Flash VM system application domain.
Implementation public static function get systemDomain():ApplicationDomain
| describeClass | () | method |
public static function describeClass(clazz:Class):XMLThis method returns the XML description of the supplied class parameter.
It actually just calls the flash.utils.describeType builtin
method (mx.utils.DescribeTypeCache is buggy and its caching
startegy is unsuitable for multiple application domain support).
clazz:Class — the class from which the XML description is to be returned.
|
XML — the XML description of the class.
|
See also
| extractPackageName | () | method |
public static function extractPackageName(name:String):String
Returns the package name of the supplied class name parameter. The class
name must be in the form of "path.to::MyClass".
name:String — class name used for extraction.
|
String — the package name of the supplied class name.
|
| extractSimpleName | () | method |
public static function extractSimpleName(name:String):String
Returns the simple (without the package part) name of the supplied
class name parameter. The class name must be in the form of
"path.to::MyClass".
name:String — class name used for extraction.
|
String — the simple name of the supplied class name.
|
| forInstance | () | method |
public static function forInstance(o:*, domain:ApplicationDomain = null):Class
Returns the Class of the supplied instance parameter.
Notes:
flash.utils.Proxy instance, this method will try to
get its class by using the qualified class name of the instance and the supplied application
domain.null, this method returns null.uint instance, this method returns the class
int (Flash VM bug)o:* — the instance from which the Class is to be returned.
|
|
domain:ApplicationDomain (default = null) — the optional application domain to be used for getting the class definition.
|
Class — the Class of the supplied instance (or null
if the o parameter is null).
|
— if o is a function or a class.
|
|
ClassNotFoundError — if no Class can be found in
the supplied or system domain with this the given object class name.
|
| forName | () | method |
public static function forName(name:String, domain:ApplicationDomain = null):Class
Returns the Class denoted by the name parameter, in the optional application
domain parameter. If domain parameter is null, this method will try to use the Flash system
domain.
name:String — the class name.
|
|
domain:ApplicationDomain (default = null) — the optional application domain to be used for getting the class definition.
|
Class — the Class object denoted by the name parameter (or null
if the name parameter is null).
|
ClassNotFoundError — if no Class can be found in
the supplied or system domain with this name.
|
| getName | () | method |
public static function getName(clazz:Class):String
Returns the fully qualified name of the supplied Class parameter
in the form of "path.to::MyClass".
clazz:Class — class whose name is to be returned.
|
String — the fully qualified name of the supplied Class.
|
| getPackageName | () | method |
public static function getPackageName(clazz:Class):String
Returns the package name of the supplied Class parameter.
clazz:Class — class whose package name is to be returned.
|
String — the package name of the supplied Class.
|
| getSimpleName | () | method |
public static function getSimpleName(clazz:Class):String
Returns the simple (without the package part) name of the supplied
Class parameter.
clazz:Class — class whose name is to be returned.
|
String — the simple name of the supplied Class.
|
| getUnqualifiedClassName | () | method |
public static function getUnqualifiedClassName(o:Object):StringGet the unqualified (simple) class name of the object passed as a parameter.
Parameterso:Object — object whose class name is to be returned.
|
String — the unqualified class name of the supplied object.
|
| hasDefinition | () | method |
public static function hasDefinition(name:String, domain:ApplicationDomain = null):BooleanTest if a class name exists in the supplied domain or in the global system domain.
Parametersname:String — the class name.
|
|
domain:ApplicationDomain (default = null) — the optional application domain to be used for testing the class definition.
|
Boolean — true if the class name exists in the supplied domain or, if domain
is null, in the system domain; false otherwise.
|
| isAnnotatedWith | () | method |
public static function isAnnotatedWith(o:*, annotationName:String):BooleanTests if the supplied object class is annotated with a given annotation name.
Parameterso:* — the object (may be a class) to test.
|
|
annotationName:String — the annotation name to look for.
|
Boolean — true if the object is annotated with the given annotation
name, false otherwise.
|
| isFlashClass | () | method |
public static function isFlashClass(clazz:Class):Boolean
Tests if the supplied clazz parameter is a Flash class, ie. defined in the
flash or air package or any of their subpackages.
clazz:Class — the classe to be tested.
|
Boolean — true if clazz is a Flash class, false otherwise.
|
| isMathClass | () | method |
public static function isMathClass(clazz:Class):Boolean
Tests if the supplied clazz parameter is a GraniteDS Math class, ie. in the
org.granite.math package or any of its subpackages.
clazz:Class — the classe to be tested.
|
Boolean — true if clazz is a big number class, false otherwise.
|
| isMxClass | () | method |
public static function isMxClass(clazz:Class):Boolean
Tests if the supplied clazz parameter is a Flex class, ie. defined in the
mx package or any of its subpackages.
clazz:Class — the classe to be tested.
|
Boolean — true if clazz is a Flex class, false otherwise.
|
| isTopLevel | () | method |
public static function isTopLevel(clazz:Class):Boolean
Tests if the supplied clazz parameter is a Top Level class defined in the
Flash 10 VM (including Vector).
clazz:Class — the classe to be tested.
|
Boolean — true if clazz is a top level class, false otherwise.
|
| isVector | () | method |
public static function isVector(o:*):BooleanTests if the supplied o parameter is an instance of the Flash 10 Vector class. This method doesn't use directly the Vector class, so it is compatible with earlier Flash versions.
Parameterso:* — the instance to test.
|
Boolean — true if o is a Vector instance, false otherwise.
|
| parseQName | () | method |
public static function parseQName(name:String, upperPolicy:Boolean = true):Array
Split a name into a namespace prefix and a value. Returns an array of two
Strings, the first one containing the prefix (possibly null
or empty), the second one containing the associated value.
ClassUtil.parseQName("path.to.MyClass"); // [null, "path.to.MyClass"]
ClassUtil.parseQName("path.to::MyClass"); // [null, "path.to::MyClass"]
ClassUtil.parseQName("::MyClass"); // [null, "::MyClass"]
ClassUtil.parseQName(":MyClass"); // ["", "MyClass"]
ClassUtil.parseQName("MyClass"); // ["", "MyClass"]
ClassUtil.parseQName("MyClass.Inner"); // ["", "MyClass.Inner"]
ClassUtil.parseQName("myClass.Inner"); // [null, "myClass.Inner"]
ClassUtil.parseQName("MyClass", false)); // ["", "MyClass"]
ClassUtil.parseQName("MyClass.Inner", false); // [null, "MyClass.Inner"]
ClassUtil.parseQName("myClass.Inner", false); // [null, "myClass.Inner"]
ClassUtil.parseQName("abc:MyClass"); // ["abc", "MyClass"]
ClassUtil.parseQName("ABC:MyClass"); // ["ABC", "MyClass"]name:String — the name to be parsed for namespace prefix and value.
|
|
upperPolicy:Boolean (default = true) — should we consider a String without any ':' character but
at least one '.' character and beginning by an uppercase letter as a
qualified name in the default namespace?
|
Array — an array of two Strings, the first one containing the prefix (possibly
null or empty), the second one containing the associated value.
|