Class ClassPathConfigFunctionLoader

  • All Implemented Interfaces:
    FunctionLoader

    public class ClassPathConfigFunctionLoader
    extends java.lang.Object
    implements FunctionLoader
    A function loader that loads function from classpath config file.
    • Field Detail

      • CUSTOM_FUNCTION_LIST_FILE

        private static java.lang.String CUSTOM_FUNCTION_LIST_FILE
      • totalCustomFunctions

        private static int totalCustomFunctions
      • functions

        private java.util.Map<java.lang.String,​AviatorFunction> functions
    • Constructor Detail

      • ClassPathConfigFunctionLoader

        private ClassPathConfigFunctionLoader()
    • Method Detail

      • onFunctionNotFound

        public AviatorFunction onFunctionNotFound​(java.lang.String name)
        Description copied from interface: FunctionLoader
        Invoked when function not found, The implementation must returns null when function not found.
        Specified by:
        onFunctionNotFound in interface FunctionLoader
        Parameters:
        name - function name
      • info

        private static void info​(java.lang.String msg)
      • error

        private static void error​(java.lang.String msg)
      • load

        private java.util.Map<java.lang.String,​AviatorFunction> load()
        Load custom functions from config file, default is "aviator_functions.config" in classpath.
        Returns:
      • loadClass

        private AviatorFunction loadClass​(java.lang.String className)
      • closeQuietly

        private static void closeQuietly​(java.io.Closeable c)