| Package | ch.capi.core |
| Class | public final class ApplicationContext |
ApplicationFile.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new
ApplicationContext object. | ApplicationContext | ||
|
addFile(file:ApplicationFile):void
Add the specified
ApplicationFile to the current ApplicationContext. | ApplicationContext | ||
|
clear():void
Clear all the
ApplicationFile of the ApplicationContext. | ApplicationContext | ||
|
enumerateContexts():Array
[static]
Enumerates all
ApplicationContext instances. | ApplicationContext | ||
|
enumerateFiles(globalOnly:Boolean = false):Array
Enumerates all the
ApplicationFile contained into the ApplicationContext. | ApplicationContext | ||
|
getFile(name:String):ApplicationFile
Get the
ApplicationFile linked to the specified name. | ApplicationContext | ||
|
[static]
Retrieves the global
ApplicationContext. | ApplicationContext | ||
|
removeFile(file:ApplicationFile, recursiveRemoval:Boolean = false):void
Remove the specified
ApplicationFile from the ApplicationContext. | ApplicationContext | ||
| ApplicationContext | () | constructor |
public function ApplicationContext()
Creates a new ApplicationContext object.
| addFile | () | method |
public function addFile(file:ApplicationFile):void
Add the specified ApplicationFile to the current ApplicationContext. If
the context of the ApplicationFile is already specified, this method will throw an error.
This method will also check that all dependencies of the specified ApplicationFile are
already into the current ApplicationContext. If they are in no ApplicationContext
they will be added into the current one, otherwise an error will be thrown.
file:ApplicationFile — The ApplicationFile.
|
— If the ApplicationContext of the file is not null.
|
|
— If one of the dependencies is in another ApplicationContext.
|
|
— If the name of the ApplicationFile is already taken.
|
| clear | () | method |
public function clear():void
Clear all the ApplicationFile of the ApplicationContext. The context property of the
ApplicationFile instances are reset to null to let the Garbate Collector take care of
the ApplicationContext instance.
| enumerateContexts | () | method |
public static function enumerateContexts():Array
Enumerates all ApplicationContext instances.
Array — An Array containing all ApplicationContext.
|
| enumerateFiles | () | method |
public function enumerateFiles(globalOnly:Boolean = false):Array
Enumerates all the ApplicationFile contained into the ApplicationContext.
globalOnly:Boolean (default = false) — Defines if only the global files or all the files must be listed.
|
Array — An Array containing the enumerated ApplicationFile.
|
| getFile | () | method |
public function getFile(name:String):ApplicationFile
Get the ApplicationFile linked to the specified name.
name:String |
ApplicationFile —
The ApplicationFile or null.
|
| getGlobalContext | () | method |
public static function getGlobalContext():ApplicationContext
Retrieves the global ApplicationContext.
ApplicationContext —
The global ApplicationContext.
|
| removeFile | () | method |
public function removeFile(file:ApplicationFile, recursiveRemoval:Boolean = false):void
Remove the specified ApplicationFile from the ApplicationContext. All the
ApplicationFile having the specified file as dependency, will have it removed.
If the recursiveRemoval argument is set to true, then all the dependencies of the specified
file will also be removed from the ApplicationContext. In the other case, all the dependencies
of the specified ApplicationFile are cleared.
file:ApplicationFile — The ApplicationFile to remove.
|
|
recursiveRemoval:Boolean (default = false) — If the removal must be applied on all the dependencies of the file.
|