Class SelfNamedPlugin

    • Constructor Detail

      • SelfNamedPlugin

        public SelfNamedPlugin()
    • Method Detail

      • getPluginNames

        public static String[] getPluginNames()
        Get the names of this plugin implementation. Returns all names to which this plugin answers.

        A name should be a short generic name illustrative of the service, e.g. "PDF", "JPEG", "GIF" for media filters.

        Each name must be unique among all the plugins implementing any given interface, but it can be the same as a name of a plugin for a different interface. For example, two classes may each have a "default" name if they do not implement any of the same interfaces.

        Returns:
        array of names of this plugin
      • getPluginInstanceName

        public String getPluginInstanceName()
        Description copied from interface: NameAwarePlugin
        Get the instance's particular name. Returns the name by which the class was chosen when this instance was created. Only works for instances created by PluginService, or if someone remembers to call setPluginName.

        Useful when the implementation class wants to be configured differently when it is invoked under different names.

        Specified by:
        getPluginInstanceName in interface NameAwarePlugin
        Returns:
        name or null if not available.
      • setPluginInstanceName

        public void setPluginInstanceName​(String name)
        Description copied from interface: NameAwarePlugin
        Set the name under which this plugin was instantiated. Not to be invoked by application code, it is called automatically by PluginService.getNamedPlugin() when the plugin is instantiated.
        Specified by:
        setPluginInstanceName in interface NameAwarePlugin
        Parameters:
        name - -- name used to select this class.