Class KernelPlugin

    • Constructor Detail

      • KernelPlugin

        public KernelPlugin​(String name,
                            @Nullable
                            String description,
                            Map<String,​KernelFunction<?>> plugins)
        Creates a new instance of the KernelPlugin class.
        Parameters:
        name - The name of the plugin.
        description - The description of the plugin.
        plugins - The functions in the plugin.
    • Method Detail

      • addFunction

        public void addFunction​(KernelFunction<?> function)
        Adds a function to the plugin.
        Parameters:
        function - The function to add.
      • getFunctions

        public Map<String,​KernelFunction<?>> getFunctions()
        Gets the functions in the plugin.
        Returns:
        The functions in the plugin.
      • get

        @Nullable
        public <T> KernelFunction<T> get​(String functionName)
        Gets a function by name.
        Type Parameters:
        T - The return type of the function.
        Parameters:
        functionName - The name of the function.
        Returns:
        The function with the specified name, or null if no such function exists.
      • getName

        public String getName()
        Gets the name of the plugin.
        Returns:
        The name of the plugin.
      • getDescription

        @Nullable
        public String getDescription()
        Gets the description of the plugin.
        Returns:
        The description of the plugin.