Class JVMPluginLanguageService
- java.lang.Object
-
- org.spongepowered.plugin.builtin.jvm.JVMPluginLanguageService
-
- All Implemented Interfaces:
PluginLanguageService<JVMPluginResource>
public abstract class JVMPluginLanguageService extends Object implements PluginLanguageService<JVMPluginResource>
-
-
Constructor Summary
Constructors Constructor Description JVMPluginLanguageService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<PluginCandidate<JVMPluginResource>>
createPluginCandidates(Environment environment, JVMPluginResource 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.protected boolean
isValidMetadata(Environment environment, org.spongepowered.plugin.metadata.PluginMetadata metadata)
abstract org.spongepowered.plugin.metadata.Container
loadMetadataContainer(Environment environment, InputStream stream)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.spongepowered.plugin.PluginLanguageService
name, pluginLoader
-
-
-
-
Method Detail
-
initialize
public void initialize(Environment environment)
Description copied from interface:PluginLanguageService
Callback so that implementors can perform any necessary initialization of the service.- Specified by:
initialize
in interfacePluginLanguageService<JVMPluginResource>
- Parameters:
environment
- The environment the service is running under
-
createPluginCandidates
public final List<PluginCandidate<JVMPluginResource>> createPluginCandidates(Environment environment, JVMPluginResource resource) throws Exception
Description copied from interface:PluginLanguageService
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.- Specified by:
createPluginCandidates
in interfacePluginLanguageService<JVMPluginResource>
- Parameters:
environment
- The environmentresource
- The resource- Returns:
- The
candidates
- Throws:
Exception
-
loadMetadataContainer
public abstract org.spongepowered.plugin.metadata.Container loadMetadataContainer(Environment environment, InputStream stream) throws Exception
- Throws:
Exception
-
isValidMetadata
protected boolean isValidMetadata(Environment environment, org.spongepowered.plugin.metadata.PluginMetadata metadata)
-
-