Package | org.flexunit.experimental.theories |
Class | public class ParameterSignature |
Inheritance | ParameterSignature ![]() |
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.
Property | Defined By | ||
---|---|---|---|
type : Class [read-only]
Returns the type of the ParameterSignature. | ParameterSignature |
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 |
type | property |
type:Class
[read-only]
Returns the type of the ParameterSignature
.
public function get type():Class
ParameterSignature | () | Constructor |
public function ParameterSignature(type:Class, metaDataList:Array)
Constructor.
Parameterstype:Class — The Class type of the parameter.
| |
metaDataList:Array — Associated metadata for the method the parameter is associated with.
|
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.
|
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.
|
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.
|
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 |
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.
|
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.
|
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.
|
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.
|
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.
ReturnsString |