TypeUtil
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Version: | 05/12/07 |
| Author: | Aaron Clinger, David Nelson |
| Classpath: | org.casalib.util.TypeUtil |
| File last modified: | Monday, 01 December 2008, 13:34:40 |
Utilities for determining an object's type.
Summary
Class methods
getTypeOf
static function getTypeOf (
obj:Object) : String
Evaluates an object and returns a string describing its type. This method is more versed than the
typeof equivalent. Parameters:
obj:
Object to evaluate.
Returns:
- Returns a string describing the objects type.
Usage note:
- org.casalib.textfield.CoreTextField and org.casalib.movieclip.CoreMovieClip will return types of
"textfield"and"movieclip"respectively.
isTypeOf
static function isTypeOf (
obj:Object,
type:String) : Boolean
Evaluates if an object is of a certain type. Can detect any types that getTypeOf can describe.
Parameters:
obj :
Object to evaluate.
type:
String describe the objects type.
Returns:
- Returns
trueif object matches type; otherwisefalse.