Class AbstractFunction

    • Field Detail

      • EXECUTION_PREFIX

        public static final java.lang.String EXECUTION_PREFIX
        The string contains the prefix for all executing methods of functions
        See Also:
        Constant Field Values
      • ALL_FUNCTIONS

        public static final AbstractFunction[] ALL_FUNCTIONS
        Inside array contains all functions supported by the preprocessor
      • FUNCTION_NAME_MAP

        public static final java.util.Map<java.lang.String,​AbstractFunction> FUNCTION_NAME_MAP
      • UID_COUNTER

        protected static final java.util.concurrent.atomic.AtomicLong UID_COUNTER
        Inside counter to generate UID for some cases
    • Constructor Detail

      • AbstractFunction

        public AbstractFunction()
    • Method Detail

      • findForClass

        public static <E extends AbstractFunction> E findForClass​(java.lang.Class<E> functionClass)
        Allows to find a function handler instance for its class
        Type Parameters:
        E - the class of the needed function handler extends the AbstractFunction class
        Parameters:
        functionClass - the class of the needed handler, must not be null
        Returns:
        an instance of the needed handler or null if there is not any such one
      • findForName

        public static AbstractFunction findForName​(java.lang.String str)
        Find a function handler for its name
        Parameters:
        str - the function name, must not be null
        Returns:
        an instance of the needed handler or null if there is not any such one
      • getName

        public abstract java.lang.String getName()
        Get the function name
        Returns:
        the function name in lower case, must not be null
      • getReference

        public abstract java.lang.String getReference()
        Get the function reference to be output for a help request
        Returns:
        the function information as a String, must not be null
      • getArity

        public abstract int getArity()
        Get the function arity
        Returns:
        the function arity (zero or greater)
      • getAllowedArgumentTypes

        @MustNotContainNull
        public abstract ValueType[][] getAllowedArgumentTypes()
        Get arrays of supported argument types
        Returns:
        the array of argument type combinations allowed by the function handler, must not be null
      • getResultType

        public abstract ValueType getResultType()
        Get the result type
        Returns:
        the result type of the function, must not be null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object