com.adobe.gravity.utility.factory

# FactoryAdapter - AS3 ADEP Client Component

Package | com.adobe.gravity.utility.factory
Class | public class FactoryAdapter
Inheritance | FactoryAdapter Object
Implements | IFactory

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10

Runtime Versions: | AIR 1.1, Flash Player 9

The returned IToken must call success handlers with a single object, that object being the "new instance" of interest.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | FactoryAdapter(factoryFunction:Function, params:Array) Construct a FactoryAdapter that will use the provided function to produce instances. | FactoryAdapter
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | newInstance(... params):com.adobe.gravity.utility.async:IToken Create a new instance of an object by calling the provided factory function with the parameters passed in the constructor followed by the parameters provided here. | FactoryAdapter
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Constructor Detail

### FactoryAdapter

()
Constructor

`public function FactoryAdapter(factoryFunction:Function, params:Array)`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10

Runtime Versions: | AIR 1.1, Flash Player 9

Construct a FactoryAdapter that will use the provided function to produce instances.

Parameters

| `factoryFunction:Function` — The actual factory function. The function must return an IToken; the success handlers of the IToken must receive a single object, that object being the "new instance" of interest.
| `params:Array` — Any parameters to be passed to factoryFunction.

Method Detail

### newInstance

()
method

`public function newInstance(... params):com.adobe.gravity.utility.async:IToken`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10

Runtime Versions: | AIR 1.1, Flash Player 9

Create a new instance of an object by calling the provided factory function with the parameters passed in the constructor followed by the parameters provided here.

Parameters

| `... params` — Any extra parameters to be provided to the factory function.

Returns

| `com.adobe.gravity.utility.async:IToken` — A token used to set success and failure handlers to be called when the operation has completed. The success handler must be called with the new instance.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00