Module org.spongepowered.plugin.spi
Package org.spongepowered.plugin
Interface PluginLanguageService
- All Known Implementing Classes:
StandardPluginLanguageService
public interface PluginLanguageService
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 Summary
Modifier and TypeMethodDescriptioncreatePluginCandidates
(Environment environment, PluginResource resource) Asks the service if the providedresource
can becomecandidates
.void
initialize
(Environment environment) Callback so that implementors can perform any necessary initialization of the service.name()
-
Method Details
-
name
String name()- Returns:
- The
name
-
pluginLoader
String pluginLoader()- Returns:
- The fully qualified path to the
loader
-
initialize
Callback so that implementors can perform any necessary initialization of the service.- Parameters:
environment
- The environment the service is running under
-
createPluginCandidates
List<PluginCandidate> createPluginCandidates(Environment environment, PluginResource resource) throws Exception Asks the service if the providedresource
can becomecandidates
.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 environmentresource
- The resource- Returns:
- The
candidates
- Throws:
Exception
-