Interface PluginLanguageService<P extends PluginResource>

  • Type Parameters:
    P - The resource type
    All Known Implementing Classes:
    JVMPluginLanguageService

    public interface PluginLanguageService<P extends PluginResource>
    A service that processes resources and triggers loading of containers via a specified loader.

    No class loading should occur at this time

    Implementors are required to have a no-args constructor

    • Method Detail

      • pluginLoader

        String pluginLoader()
        Returns:
        The fully qualified path to the loader
      • initialize

        void initialize​(Environment environment)
        Callback so that implementors can perform any necessary initialization of the service.
        Parameters:
        environment - The environment the service is running under
      • createPluginCandidates

        List<PluginCandidate<P>> createPluginCandidates​(Environment environment,
                                                        P resource)
                                                 throws Exception
        Asks the service if the provided resource can become candidates.

        It is left up to implementors on when to throw exceptions (typically from parsing the resource) or to simply return lists that are empty. Therefore it should be known that an empty list returned is not an error and should be discarded by callers of this method.

        Parameters:
        environment - The environment
        resource - The resource
        Returns:
        The candidates
        Throws:
        Exception