Interface Function

    • Method Detail

      • initArgs

        void initArgs​(Expression[] args)
        Initialize this function with the given arguments.
      • getType

        default java.lang.Class<?> getType()
        Returns the type that this function will return upon execution
        Since:
        8.0, only used for intellihint completion - implementations should not rely on getType; instead coerce defensively using TypeUtilities
      • getArgDocString

        java.lang.String getArgDocString()
        Returns a string to be used in the auto-generated function documentation. The string should represent the arguments for the function, such as "string, count" for the "repeat" function.
      • copy

        Function copy()
        Creates a copy of this function. Each FunctionExpression will always retrieve a copy of the function that it wants. It is up to the function whether or not a true copy is retrieved, or simply a reference to the main function object. If the function stores transient data during serialization, and thus cannot be shared between expressions, a copy must be made.
      • connect

        void connect​(CommonContext context,
                     InteractionListener updateListener)
        Gives the function a chance to connect itself to things, if necessary. Most functions do not have any connections. A function should notify the updateListener if they change. The implementation of InteractionListener should execute as quickly as possible, and should not block.
      • disconnect

        void disconnect()
        Tells the function to disconnect from anything it was connected to.
      • startup

        void startup()
        Tells the function to startup any polling operations. Functions that use this can remember the updateListener from connect() to feed update notification to.
      • shutdown

        void shutdown()
        Tells the function to shutdown any polling operations.