Package org.spongepowered.plugin
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 processesresourcesand triggers loading ofcontainersvia a specifiedloader.No class loading should occur at this time
Implementors are required to have a no-args constructor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<PluginCandidate<P>>createPluginCandidates(Environment environment, P resource)Asks the service if the providedresourcecan becomecandidates.voidinitialize(Environment environment)Callback so that implementors can perform any necessary initialization of the service.Stringname()StringpluginLoader()
-
-
-
Method Detail
-
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 providedresourcecan becomecandidates.It is left up to implementors on when to throw exceptions (typically from parsing the resource) or to simply return
liststhat 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
-
-