Module org.spongepowered.plugin.spi
Package org.spongepowered.plugin.builtin
Class StandardPluginLanguageService
java.lang.Object
org.spongepowered.plugin.builtin.StandardPluginLanguageService
- All Implemented Interfaces:
PluginLanguageService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePluginCandidates(Environment environment, PluginResource resource) Asks the service if the providedresourcecan becomecandidates.voidinitialize(Environment environment) Callback so that implementors can perform any necessary initialization of the service.protected booleanisValidContainer(Environment environment, Container container) protected booleanisValidMetadata(Environment environment, PluginMetadata metadata) protected ContainerloadMetadataContainer(Environment environment, InputStream stream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.plugin.PluginLanguageService
name, pluginLoader
-
Field Details
-
logger
-
-
Constructor Details
-
StandardPluginLanguageService
public StandardPluginLanguageService()
-
-
Method Details
-
initialize
Description copied from interface:PluginLanguageServiceCallback so that implementors can perform any necessary initialization of the service.- Specified by:
initializein interfacePluginLanguageService- Parameters:
environment- The environment the service is running under
-
createPluginCandidates
public List<PluginCandidate> createPluginCandidates(Environment environment, PluginResource resource) throws Exception Description copied from interface:PluginLanguageServiceAsks 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.- Specified by:
createPluginCandidatesin interfacePluginLanguageService- Parameters:
environment- The environmentresource- The resource- Returns:
- The
candidates - Throws:
Exception
-
loadMetadataContainer
protected Container loadMetadataContainer(Environment environment, InputStream stream) throws Exception - Throws:
Exception
-
isValidContainer
-
isValidMetadata
-