Package net.thisptr.jackson.jq
Class BuiltinFunctionLoader
java.lang.Object
net.thisptr.jackson.jq.BuiltinFunctionLoader
Use
BuiltinFunctionLoader.getInstance()
to obtain the instance.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final com.fasterxml.jackson.databind.ObjectMapper
private static BuiltinFunctionLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String[]
private static String[]
static BuiltinFunctionLoader
listFunctions
(ClassLoader classLoader, Version version, Scope closureScope) Load function definitions from the default resource from an arbitraryClassLoader
.listFunctions
(Version version, Scope closureScope) loadConfig
(ClassLoader loader, String path) void
loadFunctions
(ClassLoader classLoader, Version version, Scope closureScope) void
loadFunctions
(Version version, Scope closureScope) loadFunctionsFromJsonJq
(ClassLoader classLoader, Version version, Scope closureScope) Do not use this method.loadFunctionsFromServiceLoader
(ClassLoader classLoader, Version version) Do not use this method.private static String
resolvePath
(Class<?> clazz, String name) Dynamically resolve the path for a resource as packages may be relocated, e.g.
-
Field Details
-
INSTANCE
-
DEFAULT_MAPPER
private static final com.fasterxml.jackson.databind.ObjectMapper DEFAULT_MAPPER -
CONFIG_PATH
-
-
Constructor Details
-
BuiltinFunctionLoader
private BuiltinFunctionLoader()
-
-
Method Details
-
getInstance
-
resolvePath
Dynamically resolve the path for a resource as packages may be relocated, e.g. by the maven-shade-plugin. -
listFunctions
public Map<String,Function> listFunctions(ClassLoader classLoader, Version version, Scope closureScope) Load function definitions from the default resource from an arbitraryClassLoader
. E.g. in an OSGi context this may be the Bundle'sClassLoader
. -
listFunctions
-
loadFunctions
-
loadFunctions
-
loadConfig
- Throws:
IOException
-
extractFunctionNamesFromAnnotationIfVersionMatch
-
extractFunctionNamesFromDeprecatedAnnotationIfVersionMatch
-
loadFunctionsFromServiceLoader
public Map<String,Function> loadFunctionsFromServiceLoader(ClassLoader classLoader, Version version) Do not use this method. This method is only for Quarkus extension. -
loadFunctionsFromJsonJq
public Map<String,Function> loadFunctionsFromJsonJq(ClassLoader classLoader, Version version, Scope closureScope) Do not use this method. This method is only for Quarkus extension.
-