| Package | org.pranaframework.utils |
| Class | public class MetadataUtils |
See also
| Property | Defined by | ||
|---|---|---|---|
| CLEAR_CACHE_INTERVAL : uint = 60000 [static]
The interval (in miliseconds) at which the cache will be cleared.
| MetadataUtils | ||
| Method | Defined by | ||
|---|---|---|---|
|
clearCache():void
[static]
Allows you to clear the internal cache.
| MetadataUtils | ||
|
getFromObject(object:Object):XML
[static]
Will return the metadata for the given object or class.
| MetadataUtils | ||
|
getFromString(className:String):XML
[static]
Will retrieve the metadata for the given class.
| MetadataUtils | ||
| CLEAR_CACHE_INTERVAL | property |
public static var CLEAR_CACHE_INTERVAL:uint = 60000The interval (in miliseconds) at which the cache will be cleared. Note that this value is only used on the first call to getFromObject.
The default value is 60000 (one minute).
| clearCache | () | method |
public static function clearCache():voidAllows you to clear the internal cache.
| getFromObject | () | method |
public static function getFromObject(object:Object):XMLWill return the metadata for the given object or class. If metadata has already been requested for this type, it will be retrieved from cache. Note that the metadata will allways be that of the class, even if you pass an instance.
In order to get instance specific metadata, use the 'factory' property. The reason we do not allow retrieval of instance metadata is because then we would need to cache the metadata double. Metadata takes up a significant amount of memory. Parametersobject:Object — The object from which you want to grab the metadata
|
XML — The class metadata of the given object.
|
| getFromString | () | method |
public static function getFromString(className:String):XMLWill retrieve the metadata for the given class. Note that in order to access properties and methods you need to grab the 'factory' part of the metadata.
ParametersclassName:String — The name of the class that you want to retrieve metadata from. The className
may be in the following forms: package.Class or package::Class
|
XML |