Class: FunctionSignature

olympe.df. FunctionSignature

This class represents a function signature. More specifically the return type of the function and which of its arguments need to be resolved.


new FunctionSignature( [returnType] [, toBeResolvedArgs] [, typeField])

Creates a new FunctionSignature.

Parameters:
Name Type Argument Description
returnType function <optional>
toBeResolvedArgs Array.<number> <optional>
typeField string <optional>

Members


<static> emptySignature :olympe.df.FunctionSignature

Type:

<static> noProxy :olympe.df.FunctionSignature

Type:

<static> oBooleanSignature :olympe.df.FunctionSignature

Type:

<static> oNumberSignature :olympe.df.FunctionSignature

Type:

<static> oStringSignature :olympe.df.FunctionSignature

Type:

<static> thisSignature :olympe.df.FunctionSignature

Type:

<static> vector2Signature :olympe.df.FunctionSignature

Type:

Methods


<static> createThisSignature( [args])

Creates a FunctionSignature for a 'chaining' function. This is a special type of method that returns 'this' to allow chaining calls. e.g.:

label.setText('Hello').setPosition(pos).setDimension(dim);

Should be strictly equivalent as:

label.setText('Hello');
label.setPosition(pos);
label.setDimension(dim);
Parameters:
Name Type Argument Description
args Array.<number> <optional>
Returns:
Type
olympe.df.FunctionSignature

getArgsToBeResolved()

Gets the list, in an array, of the arguments of the function that have to be resolved.

Returns:

an array containing the index of all the arguments that should be resolved before invoking the function

Type
Array.<number>

getReturnType()

Gets the return type of this signature.

Returns:

The constructor function for the type of this signature

Type
function | undefined

getTypeField()

Gets the type field to use for generics.

Returns:

the name of the field to use when proxying generics

Type
string | undefined

isNoProxy()

Checks whether this is a noProxy signature.

Returns:
Type
boolean

isReturnThis()

Checks whether this is a this signature

Returns:
Type
boolean