(.js)
laraImport("kadabra.adapt.Specializer");
(.lara)
import kadabra.adapt.Specializer;
Aspects
ExtractFunctionalInterface
This aspect is used to extract a functional interface for a method of a class
The interface is extracted to the same package as the target class
TODO: deal with overloading
Inputs
targetMethod: any
targetClass: any (optional)
targetFile: any (optional)
associate: any (optional)
newFile: any (optional)
Outputs
$interface: any
$defaultMethod: any
$function: any
targetMethodName: any (optional)
ExtractToField
Prepares a given method call by: <br>
extracting a functional interface <br>
create a field of that type <br>
initialize the field with the called method <br>
replace the call with invocation of the field method <br>
NOTE: This is an alias for "PrepareCall" aspect
Inputs
$call: any
$method: any
$fieldLocation: any
newFile: any (optional)
$funcInterface: any (optional)
Outputs
$field: any
$interface: any
$interfaceMethod: any
defaultMethod: any
NewFunctionalMethodCaller2
Generate class for functional mapping
Inputs
$interface: any (optional)
methodName: any (optional)
getterType: any (optional)
defaultMethodStr: any (optional)
Outputs
$mapClass: any
put: any (optional)
contains: any (optional)
get: any
NewMappingClass
Generate class for functional mapping
Inputs
$interface: any (optional)
methodName: any (optional)
getterType: any (optional)
$target: any
Outputs
$mapClass: any
put: any
contains: any
get: any
PrepareCall
Prepares a given method call by: <br>
extracting a functional interface <br>
create a field of that type <br>
initialize the field with the called method <br>
replace the call with invocation of the field method
Inputs
$method: any (optional)
$call: any (optional)
$fieldLocation: any (optional)
newFile: any (optional)
$funcInterface: any (optional)
Outputs
$field: any (optional)
$interface: any (optional)
$interfaceMethod: any
defaultMethod: any