Class BuiltinFunctionLoader

java.lang.Object
net.thisptr.jackson.jq.BuiltinFunctionLoader

public class BuiltinFunctionLoader extends Object
Use BuiltinFunctionLoader.getInstance() to obtain the instance.
  • Field Details

    • INSTANCE

      private static BuiltinFunctionLoader INSTANCE
    • DEFAULT_MAPPER

      private static final com.fasterxml.jackson.databind.ObjectMapper DEFAULT_MAPPER
    • CONFIG_PATH

      private static final String CONFIG_PATH
  • Constructor Details

    • BuiltinFunctionLoader

      private BuiltinFunctionLoader()
  • Method Details

    • getInstance

      public static BuiltinFunctionLoader getInstance()
    • resolvePath

      private static String resolvePath(Class<?> clazz, String name)
      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 arbitrary ClassLoader. E.g. in an OSGi context this may be the Bundle's ClassLoader.
    • listFunctions

      public Map<String,Function> listFunctions(Version version, Scope closureScope)
    • loadFunctions

      public void loadFunctions(Version version, Scope closureScope)
    • loadFunctions

      public void loadFunctions(ClassLoader classLoader, Version version, Scope closureScope)
    • loadConfig

      private static List<JqJson> loadConfig(ClassLoader loader, String path) throws IOException
      Throws:
      IOException
    • extractFunctionNamesFromAnnotationIfVersionMatch

      private static String[] extractFunctionNamesFromAnnotationIfVersionMatch(Function fn, Version version)
    • extractFunctionNamesFromDeprecatedAnnotationIfVersionMatch

      private static String[] extractFunctionNamesFromDeprecatedAnnotationIfVersionMatch(Function fn, Version version)
    • 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.