public static function inherit(childClass:Class, parentClass:Class):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Verify that the passed-in childClass is a descendant of the
specified parentClass.
Parameters
| childClass:Class — class to check inheritance with the ascendant class
|
| |
| parentClass:Class — class which is the ascendant
|
Returns
public static function isImplemented(o:Object, classPath:String, f:String):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Use the isImplemented function to check if a virtual method of an abstract
class is really implemented by children classes.
Parameters
| o:Object — o A reference to this in the abstract class constructor.
|
| |
| classPath:String — f The name of the virtual method.
|
| |
| f:String |
Returns
| Boolean — true if the method is implemented
by the child class, either false
|
Example
A concret example in the class
AbstractTween :
if( !ClassUtils.isImplementedAll( this, "com.bourre.transitions::AbstractTween", "isMotionFinished", "isReversedMotionFinished" ) )
{
PixlibDebug.ERROR ( this + " have to implements virtual methods : isMotionFinished & isReversedMotionFinished " );
throw new UnimplementedVirtualMethodException ( this + " have to implements virtual methods : isMotionFinished & isReversedMotionFinished" );
{}
public static function isImplementedAll(o:Object, classPath:String, ... rest):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Check in one time if a set of function is implemented by the subclasses.
Parameters
| o:Object — o A reference to this in the abstract class constructor.
|
| |
| classPath:String — c A Collection object witch contains a list of function
names to verify.
|
| |
| ... rest |
Returns
| Boolean — true if all the methods are implemented
by the child class, either false. When
only one method isn't implemented then the function
failed and return immediatly.
|
See also