| Package | org.as3commons.bytecode.emit |
| Interface | public interface IMethodBuilder extends IEmitMember, IMethodBodyBuilder, IEmitObject, IMetadataContainer |
| Implementors | MethodBuilder |
MethodInfo instance to be used in an AbcFile.
| Property | Defined By | ||
|---|---|---|---|
| arguments : Array
An Array of MethodArguments. | IMethodBuilder | ||
![]() | constantPool : IConstantPool | IMethodBodyBuilder | |
![]() | exceptionInfos : Vector.<ExceptionInfo>
An Array of IExceptionInfoBuilders that are able to generate the necessary ExceptionInfo instances references in the method body. | IMethodBodyBuilder | |
| hasOptionalArguments : Boolean [read-only]
Returns true if one or more of the current IMethodBuilder's arguments has
its isOptional property set to true;
| IMethodBuilder | ||
| hasRestArguments : Boolean
If true the generated method will support rest arguments (...rest). | IMethodBuilder | ||
![]() | isFinal : Boolean
If true this member is marked as final and cannot be overridden in subclasses. | IEmitMember | |
![]() | isOverride : Boolean
If true this member overrides a member of a superclass. | IEmitMember | |
![]() | isStatic : Boolean
If true this member is marked as static. | IEmitMember | |
![]() | metadata : Array
an Array of IMetadataBuilder instances that describe the metadata that
will be generated for the current IMetadataContainer. | IMetadataContainer | |
![]() | name : String
The name of the current IEmitObject. | IEmitObject | |
![]() | namespaceURI : String
The namespace URL that the current IEmitObject belongs to. | IEmitObject | |
![]() | needActivation : Boolean [read-only] | IMethodBodyBuilder | |
![]() | needArguments : Boolean | IMethodBodyBuilder | |
![]() | opcodes : Vector.<Op>
An Array of Op instances that represent the programming logic inside the method. | IMethodBodyBuilder | |
![]() | packageName : String
The fully qualified package name for the current IEmitObject. | IEmitObject | |
| returnType : String
The fully qualified type of the return value of the generated MethodBody. | IMethodBuilder | ||
![]() | scopeName : String
The scope name that the current IEmitObject belongs to. | IEmitObject | |
![]() | setDXNS : Boolean [read-only] | IMethodBodyBuilder | |
![]() | trait : TraitInfo
The TraitInfo that is associated with the current IEmitObject, this is
usually generated automatically and needs not to be set. | IEmitObject | |
![]() | visibility : MemberVisibility
The visibility of the current IEmitObject within the package. | IEmitObject | |
| Method | Defined By | ||
|---|---|---|---|
![]() | addAsmSource(source:String):IMethodBodyBuilder
Parses and converts the specified opcode source and adds the resulting Op collection the current IMethodBodyBuilder. | IMethodBodyBuilder | |
![]() | addBackPatches(newBackpatches:Array):IMethodBodyBuilder | IMethodBodyBuilder | |
![]() |
Adds the specified Op instance. | IMethodBodyBuilder | |
![]() |
Adds an extra Op instance with the specified Opcode and parameters. | IMethodBodyBuilder | |
![]() |
Adds an Array of Op instances. | IMethodBodyBuilder | |
build(initScopeDepth:uint = 1):MethodInfo
Internally used build method, this method should never be called by third parties. | IMethodBuilder | ||
![]() | buildBody(initScopeDepth:uint = 1, extraLocalCount:uint = 0):MethodBody
Internally used build method, this method should never be called by third parties. | IMethodBodyBuilder | |
defineArgument(type:String, isOptional:Boolean = false, defaultValue:Object = null):MethodArgument
Creates and returns a new MethodArgument for the current method. | IMethodBuilder | ||
![]() |
Creates and returns a new IExceptionInfoBuilder instance. | IMethodBodyBuilder | |
![]() |
Defines a jump between the triggerOpcode and targetOpcode, for example, an iffalse opcode
can trigger a jump to an opcode further down the chain of command if it resolves to true. | IMethodBodyBuilder | |
![]() | defineMetadata(name:String = null, arguments:Array = null):IMetadataBuilder
Creates an IMetadataBuilder instance that is able to generate a metadata entry
for the current IMetadataContainer. | IMetadataContainer | |
| arguments | property |
arguments:Array
An Array of MethodArguments.
public function get arguments():Array public function set arguments(value:Array):void| hasOptionalArguments | property |
hasOptionalArguments:Boolean [read-only]
Returns true if one or more of the current IMethodBuilder's arguments has
its isOptional property set to true;
public function get hasOptionalArguments():Boolean| hasRestArguments | property |
hasRestArguments:Boolean
If true the generated method will support rest arguments (...rest).
public function get hasRestArguments():Boolean public function set hasRestArguments(value:Boolean):void| returnType | property |
returnType:String
The fully qualified type of the return value of the generated MethodBody. I.e. flash.utils.Dictionary.
public function get returnType():String public function set returnType(value:String):void| build | () | method |
public function build(initScopeDepth:uint = 1):MethodInfoInternally used build method, this method should never be called by third parties.
Parameters
initScopeDepth:uint (default = 1) |
MethodInfo —
|
| defineArgument | () | method |
public function defineArgument(type:String, isOptional:Boolean = false, defaultValue:Object = null):MethodArgument
Creates and returns a new MethodArgument for the current method.
Parameters
type:String — The fully qualified type for the argument. I.e. flash.events.Event
| |
isOptional:Boolean (default = false) — The default value for the argument when the isOptional property is set to true.
| |
defaultValue:Object (default = null) |
MethodArgument — The specified MethodArgument.
|