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

Package | org.flexunit.experimental.theories
Class | public class ParameterSignature
Inheritance | ParameterSignature Object

The `ParameterSignature` is the signautre for a specific parameter in a theory method. It contains information about the parameter's type as well as information about the method it belongs to.

Public Properties

| Property | Defined By
--- | --- | ---
|  | type : Class [read-only] Returns the type of the ParameterSignature. | ParameterSignature

Public Methods

| Method | Defined By
--- | --- | ---
|  | ParameterSignature(type:Class, metaDataList:Array) Constructor. | ParameterSignature
|  | canAcceptArrayType(field:Field):Boolean Determine if the provided field has a type of Array and if the element type of the field matches the type in this ParameterSignature. | ParameterSignature
|  | canAcceptArrayTypeMethod(frameworkMethod:FrameworkMethod):Boolean Determine if the provided framework method produces a type of Array and if the element type of the framework method's method matches the type in this ParameterSignature. | ParameterSignature
|  | canAcceptType(candidate:Class):Boolean Determine if the type of the parameter matches the provided candidate type. | ParameterSignature
|  | findDeepAnnotation(type:String):MetaDataAnnotation | ParameterSignature
|  | getAnnotation(type:String):MetaDataAnnotation Determine if there is a name attribute in the metadata that matches the supplied type. | ParameterSignature
|  | hasMetadata(type:String):Boolean Determine if there is a name attribute in the metadata that matches the supplied type. | ParameterSignature
|  | signaturesByContructor(constructor:Constructor):Array [static] Creates an Array of ParameterSignatures for each parameter in a theory constructor. | ParameterSignature
|  | signaturesByMethod(method:Method):Array [static] Creates an Array of ParameterSignatures for each parameter in a theory method. | ParameterSignature
|  | toString():String Returns a string that includes the name of the type of the parameter as well as the parameter's associated method metadata. | ParameterSignature

Property Detail

type | property

`type:Class` [read-only]

Returns the type of the `ParameterSignature`.

Implementation
`public function get type():Class`
Constructor Detail

ParameterSignature | () | Constructor

`public function ParameterSignature(type:Class, metaDataList:Array)`

Constructor.

Parameters

| `type:Class` — The Class type of the parameter.
| `metaDataList:Array` — Associated metadata for the method the parameter is associated with.

Method Detail

canAcceptArrayType | () | method

`public function canAcceptArrayType(field:Field):Boolean`

Determine if the provided field has a type of Array and if the element type of the field matches the type in this `ParameterSignature`.

Parameters

| `field:Field` — The current field to check.

Returns

| `Boolean` — a Boolean value indicating whether the current parameter can accept the element type supplied in the potential field.

canAcceptArrayTypeMethod | () | method |

`public function canAcceptArrayTypeMethod(frameworkMethod:FrameworkMethod):Boolean`

Determine if the provided framework method produces a type of Array and if the element type of the framework method's method matches the type in this `ParameterSignature`.

Parameters

| `frameworkMethod:FrameworkMethod` — The current framework method.

Returns

| `Boolean` — a Boolean value indicating whether the current parameter can accept the element type supplied in the framework method's method.

canAcceptType | () | method |

`public function canAcceptType(candidate:Class):Boolean`

Determine if the type of the parameter matches the provided candidate type.

Parameters

| `candidate:Class` — A Class that represents a potential provided parameter.

Returns

| `Boolean` — a Boolean value indicating whether the current parameter can accept a parameter of a provided tpye.

findDeepAnnotation | () | method |

`public function findDeepAnnotation(type:String):MetaDataAnnotation`

Parameters

| `type:String`

Returns

| `MetaDataAnnotation`

getAnnotation | () | method |

`public function getAnnotation(type:String):MetaDataAnnotation`

Determine if there is a name attribute in the metadata that matches the supplied type.

Parameters

| `type:String` — The name to check for in the metadata.

Returns

| `MetaDataAnnotation` — a MetaDataAnnotation that is the metadata that has a name attribute that matches the provided type. If no name match is found, a value of null is returned.

hasMetadata | () | method |

`public function hasMetadata(type:String):Boolean`

Determine if there is a name attribute in the metadata that matches the supplied type.

Parameters

| `type:String` — The name to check for in the metadata.

Returns

| `Boolean` — a Boolean value indicating whether there is metadata that has a name that matches the supplied type.

signaturesByContructor | () | method |

`public static function signaturesByContructor(constructor:Constructor):Array`

Creates an Array of `ParameterSignature`s for each parameter in a theory constructor.

Parameters

| `constructor:Constructor` — The current theory constructor.

Returns

| `Array` — an Array containing the `ParameterSignature` for each parameter in the constructor.

signaturesByMethod | () | method |

`public static function signaturesByMethod(method:Method):Array`

Creates an Array of `ParameterSignature`s for each parameter in a theory method.

Parameters

| `method:Method` — The current theory method.

Returns

| `Array` — an Array containing the `ParameterSignature` for each parameter in the method.

toString | () | method |

`public function toString():String`

Returns a string that includes the name of the type of the parameter as well as the parameter's associated method metadata.

Returns

| `String`

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