Package | impression.utilities |
Class | public class ObjectUtils |
Inheritance | ObjectUtils ![]() |
Method | Defined By | ||
---|---|---|---|
classOf(item:*):Class [static]
Returns the class definition of an item. | ObjectUtils | ||
clone(source:Object):* [static]
Returns an exact copy of the source. | ObjectUtils | ||
newInstanceOf(item:*):* [static]
Returns a new object of the type specified by item. | ObjectUtils | ||
tryCast(item:*, type:Class):* [static]
Returns an item cast to a specific class, or null if the item cannot be cast to the specified class. | ObjectUtils |
classOf | () | method |
public static function classOf(item:*):Class
Returns the class definition of an item.
Parameters
item:* — An expression to find the class definition of. item can be one of the following types:
|
Class — The class defintion of the item , or null if an error occurred or an empty string was passed.
|
See also
clone | () | method |
public static function clone(source:Object):*
Returns an exact copy of the source
.
This method writes the object to a ByteArray, then reads the result as a new object and returns it.
Parameters
source:Object — The object to return a copy of.
|
* — A copy of source .
|
See also
newInstanceOf | () | method |
public static function newInstanceOf(item:*):*
Returns a new object of the type specified by item
.
item
can be a Class reference, an instance of an object,
or a String containing the name of the class to create.
Parameters
item:* — The type of object to create.
|
* — A new object of the type specified by item .
|
See also
tryCast | () | method |
public static function tryCast(item:*, type:Class):*
Returns an item cast to a specific class, or null
if the item cannot be cast to the specified class.
Parameters
item:* — Item to cast.
| |
type:Class — Class to cast item to.
|
* — item cast as type , or null if the item cannot be cast to type .
|