Package io.virtdata.core
Class VirtDataLibraries
- java.lang.Object
-
- io.virtdata.core.VirtDataLibraries
-
- All Implemented Interfaces:
Named,VirtDataFunctionLibrary
public class VirtDataLibraries extends java.lang.Object implements VirtDataFunctionLibrary
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VirtDataLibrariesget()java.lang.StringgetName()Return the name for this function library implementation.java.util.List<ResolvedFunction>resolveFunctions(java.lang.Class<?> returnType, java.lang.Class<?> inputType, java.lang.String functionName, java.lang.Object... parameters)Given a signature for a unary function which takes an input and output type, a function name, and constructor arguments, return a list of instances from all implementations that have the same name as the function name, which have a matching constructor signature, and which also have a functional method which can be used with the provided input and output types.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.virtdata.api.VirtDataFunctionLibrary
getDataMapper, getDataMappers, resolveFunctions
-
-
-
-
Method Detail
-
get
public static VirtDataLibraries get()
-
getName
public java.lang.String getName()
Description copied from interface:NamedReturn the name for this function library implementation.
-
resolveFunctions
public java.util.List<ResolvedFunction> resolveFunctions(java.lang.Class<?> returnType, java.lang.Class<?> inputType, java.lang.String functionName, java.lang.Object... parameters)
Description copied from interface:VirtDataFunctionLibraryGiven a signature for a unary function which takes an input and output type, a function name, and constructor arguments, return a list of instances from all implementations that have the same name as the function name, which have a matching constructor signature, and which also have a functional method which can be used with the provided input and output types. The input and output types are optionally specified. If either is provided, the returned functions should be constrained to match, but otherwise all possibly matching functions are included. Further, the argument should not be strict type checks, but should allow any matching constructor for which a compatible assignment can be made. The specified function name does not have to map to a- Specified by:
resolveFunctionsin interfaceVirtDataFunctionLibrary- Parameters:
returnType- The class which the apply method should return, or null if unspecifiedinputType- The class which the unary apply method should take as an argument, or null if unspecifiedfunctionName- The name of the implementation to matchparameters- A list of arguments which will be used to instantiate any matching implementations- Returns:
- A list, possibly empty, of matching functions
-
-