Packageorg.flexunit.experimental.theories
Classpublic class ParameterSignature
InheritanceParameterSignature Inheritance 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
 PropertyDefined By
  type : Class
[read-only] Returns the type of the ParameterSignature.
ParameterSignature
Public Methods
 MethodDefined 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
  
ParameterSignature
  
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
  
[static] Creates an Array of ParameterSignatures for each parameter in a theory constructor.
ParameterSignature
  
[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
typeproperty
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 ParameterSignatures 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 ParameterSignatures 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