API Documentation | All Packages | All Classes | Index | Frames No Frames |
Constructor

Package | flex.lang.reflect
Class | public class Constructor
Inheritance | Constructor Object

Parses <constructor/> node returned from a call to `describeType` to provide an object wrapper for the Constructor

See also

Klass
Method
Field

Public Properties

| Property | Defined By
--- | --- | ---
|  | parameterTypes : Array [read-only] Builds and returns an Array containing the types of of parameters used by the Constructor | Constructor

Public Methods

| Method | Defined By
--- | --- | ---
|  | Constructor(constructorXML:XML, klass:Klass) Constructor Parses <constructor/> node returned from a call to describeType to provide an object wrapper for the Constructor Expected format of the argument is <constructor> <parameter index="1" type="quot; optional="false"/> </constructor> | Constructor
|  | newInstance(... args):Object Creates a new instance of an object using the constructor definition. | Constructor
|  | newInstanceApply(params:Array):Object Creates a new instance of an object using the constructor definition | Constructor

Property Detail

parameterTypes | property

`parameterTypes:Array` [read-only]

Builds and returns an Array containing the types of of parameters used by the Constructor

Implementation
`public function get parameterTypes():Array`
Constructor Detail

Constructor | () | Constructor

`public function Constructor(constructorXML:XML, klass:Klass)`

Constructor Parses <constructor/> node returned from a call to `describeType` to provide an object wrapper for the Constructor Expected format of the argument is <constructor> <parameter index="1" type="quot; optional="false"/> </constructor>

Parameters

| `constructorXML:XML` — <constructor/> XML node.
| `klass:Klass`

Method Detail

newInstance | () | method

`public function newInstance(... args):Object`

Creates a new instance of an object using the constructor definition. The maximum paramater list is currently restriced to 5. If more paramaters are needed, take a look at `Constructor.as` on how to create your own.

Parameters

| `... args` — the arguments to pass to the constructor(max 5).

Returns

| `Object` — A new instance of the object created by this constructor

newInstanceApply | () | method |

`public function newInstanceApply(params:Array):Object`

Creates a new instance of an object using the constructor definition

Parameters

| `params:Array` — An array of paramaters to be used by the constructor (max 5).

Returns

| `Object` — A new instance of the object created by this constructor

See also

newInstance()

Thu Apr 10 2014, 08:07 AM +10:00