SPeCS Packages Documentation
Preparing search index...
@specs-feup/kadabra
kadabra/adapt/Specializer
PrepareCall
Function PrepareCall
PrepareCall
(
$method
?:
Method
|
null
,
$call
?:
Call
|
null
,
$fieldLocation
?:
Class
|
null
|
undefined
,
newFile
?:
boolean
,
$funcInterface
?:
InterfaceType
|
null
|
undefined
,
)
:
|
{
$field
:
null
;
$interface
:
InterfaceType
|
null
;
$interfaceMethod
:
undefined
;
defaultMethod
:
undefined
;
}
|
{
$field
:
Field
|
undefined
;
$interface
:
InterfaceType
;
$interfaceMethod
:
Method
|
undefined
;
defaultMethod
:
string
;
}
Prepares a given method call by:
extracting a functional interface
create a field of that type
initialize the field with the called method
replace the call with invocation of the field method
Parameters
$method
:
Method
|
null
= null
$call
:
Call
|
null
= null
$fieldLocation
:
Class
|
null
|
undefined
= null
newFile
:
boolean
= true
$funcInterface
:
InterfaceType
|
null
|
undefined
= null
Returns
|
{
$field
:
null
;
$interface
:
InterfaceType
|
null
;
$interfaceMethod
:
undefined
;
defaultMethod
:
undefined
;
}
|
{
$field
:
Field
|
undefined
;
$interface
:
InterfaceType
;
$interfaceMethod
:
Method
|
undefined
;
defaultMethod
:
string
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
SPeCS Packages Documentation
Loading...
Prepares a given method call by: