| Package | org.as3commons.bytecode.emit |
| Interface | public interface IAbcBuilder extends flash.events.IEventDispatcher |
| Implementors | AbcBuilder |
AbcFile, ready to
be loaded into the AVM.
| Method | Defined By | ||
|---|---|---|---|
Builds an AbcFile using the previously defined IPackageBuilder instances. | IAbcBuilder | ||
buildAndExport(applicationDomain:ApplicationDomain = null):ByteArray
Builds, serializes and wraps the AbcFile in a SWF, the resulting ByteArray can be saved to
disk as a .swf file for later use. | IAbcBuilder | ||
buildAndLoad(applicationDomain:ApplicationDomain = null, newApplicationDomain:ApplicationDomain = null):AbcFile
Builds the AbcFile and immediately loads it into the AVM. | IAbcBuilder | ||
defineClass(fullName:String, superClassName:String = null):IClassBuilder
Creates an IClassBuilder instance for the specified fuly qualified class name and super class name. | IAbcBuilder | ||
defineInterface(fullName:String, superInterfaceNames:Array = null):IInterfaceBuilder
Creates an IInterfaceBuilder instance for the specified fully qualified interface name and super interface names. | IAbcBuilder | ||
defineNamespace(fullScopeName:String, URI:String):INamespaceBuilder | IAbcBuilder | ||
definePackage(name:String):IPackageBuilder
Creates an IPackageBuilder instance for the specified package name. | IAbcBuilder | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the class loader has finished loading the SWF/ABC bytecode in the Flash Player/AVM. | IAbcBuilder | |||
| Dispatched when the class loader has encountered an IO related error. | IAbcBuilder | |||
| Dispatched when the class loader has encountered a SWF verification error. | IAbcBuilder | |||
| build | () | method |
public function build(applicationDomain:ApplicationDomain = null):AbcFile
Builds an AbcFile using the previously defined IPackageBuilder instances.
Parameters
applicationDomain:ApplicationDomain (default = null) — The applicationDomain that has access to the super classes that are defined
for any classes defined in the AbcFile, defaults to ApplicationDomain.currentDomain.
|
AbcFile — The created AbcFile.
|
| buildAndExport | () | method |
public function buildAndExport(applicationDomain:ApplicationDomain = null):ByteArray
Builds, serializes and wraps the AbcFile in a SWF, the resulting ByteArray can be saved to
disk as a .swf file for later use.
Parameters
applicationDomain:ApplicationDomain (default = null) — The applicationDomain that has access to the super classes that are defined.
|
ByteArray — The ByteArray containing the serialized AbcFile wrapped inside a SWF.
|
| buildAndLoad | () | method |
public function buildAndLoad(applicationDomain:ApplicationDomain = null, newApplicationDomain:ApplicationDomain = null):AbcFile
Builds the AbcFile and immediately loads it into the AVM.
This behaviour is asynchronous, so be sure to listen for the Event.COMPLETE, IOErrorEvent.IO_ERROR and
IOErrorEvent.VERIFY_ERROR on the current IAbcBuilder.
Once the Event.COMPLETE event has been fired it will be possible to retrieve a reference to the generated classes through the specified application
domain, like this:
var cls:Class = applicationDomain.getDefinition("com.myclasses.MyGeneratedClass") as Class
Parameters
applicationDomain:ApplicationDomain (default = null) — The applicationDomain that has access to the super classes that are defined
for any classes defined in the AbcFile, defaults to ApplicationDomain.currentDomain.
| |
newApplicationDomain:ApplicationDomain (default = null) — The ApplicationDomain in which the newly created AbcFile will be loaded,
defaults to ApplicationDomain.currentDomain.
|
AbcFile — The created AbcFile.
|
| defineClass | () | method |
public function defineClass(fullName:String, superClassName:String = null):IClassBuilder
Creates an IClassBuilder instance for the specified fuly qualified class name and super class name.
Parameters
fullName:String — The fully qualified name of the new class. I.e. com.myclasses.MyGeneratedClass.
| |
superClassName:String (default = null) — The fully qualified super class name. I.e. mx.events.FlexEvent, defaults to Object.
|
IClassBuilder — The specified IClassBuilder instance.
|
| defineInterface | () | method |
public function defineInterface(fullName:String, superInterfaceNames:Array = null):IInterfaceBuilder
Creates an IInterfaceBuilder instance for the specified fully qualified interface name and super interface names.
Parameters
fullName:String — The fully qualified name of the new interface. I.e. com.myinterfaces.IMyGeneratedInterface.
| |
superInterfaceNames:Array (default = null) — The fully qualified super interface names. I.e. mx.styles.IStyleClient.
|
IInterfaceBuilder — The specified IInterfaceBuilder instance.
|
| defineNamespace | () | method |
public function defineNamespace(fullScopeName:String, URI:String):INamespaceBuilder
Parameters
fullScopeName:String | |
URI:String |
INamespaceBuilder —
|
| definePackage | () | method |
public function definePackage(name:String):IPackageBuilder
Creates an IPackageBuilder instance for the specified package name.
An example of a package name: com.myclasses.test
Parameters
name:String — The specified package name
|
IPackageBuilder — The specified IPackageBuilder instance.
|
| complete | Event |
flash.events.Eventflash.events.Event.COMPLETEDispatched when the class loader has finished loading the SWF/ABC bytecode in the Flash Player/AVM.
| ioError | Event |
flash.events.IOErrorEventflash.events.IOErrorEvent.IO_ERRORDispatched when the class loader has encountered an IO related error.
| verifyError | Event |
flash.events.IOErrorEventflash.events.IOErrorEvent.VERIFY_ERRORDispatched when the class loader has encountered a SWF verification error.