ClassUtil
| Kind of class: | class |
|---|---|
| Inherits from: | BasicClass |
| Author: | Martin Heidegger, Simon Wacker |
| Classpath: | org.as2lib.util.ClassUtil |
| File last modified: | Saturday, 02 July 2005, 22:43:52 |
ClassUtil contains fundamental operations to efficiently and easilywork with any class.
treated as classes.
Summary
Class methods
Instance methods
Instance methods inherited from BasicClass
Class methods
createCleanInstance
static function createCleanInstance (
clazz:Function) : Object
Creates a new instance of the passed-in
constructor.
clazz without invoking its constructor.
Parameters:
clazz:
the class to create a new instance of
Returns:
new instance of the passed-in class.
Author:
Martin Heidegger
Ralf Bokelberg (www.qlod.com)
Ralf Bokelberg (www.qlod.com)
createInstance
static function createInstance (
clazz:Function,
args:Array)
Creates a new instance of the passed-in
passed-in
clazz applying thepassed-in
args to the constructor.This util is mostly made for MTASC compatibility because it doesn't
allow new clazz() for usual variables.
Parameters:
clazz:
Class to be instanciated
args :
Arguments to be applied to the constructor
Returns:
new instance of the class
isImplementationOf
static function isImplementationOf (
clazz:Function,
interfaze:Function) : Boolean
Checks if the passed-in
clazz implements the passed-in * interfaze.Parameters:
clazz :
the class to check
interfaze:
the interface the
clazz may implementReturns:
true if the passed-in clazz implements the passed-ininterfaze else falseisSubClassOf
static function isSubClassOf (
subClass:Function,
superClass:Function) : Boolean
Checks if the passed-in
subClass is extended by the passed-insuperClass.Parameters:
subClass :
the class to check
superClass:
the class to match
Returns:
true if subClass is a sub-class of superClass