Class JVMPluginContainer
- java.lang.Object
-
- org.spongepowered.plugin.builtin.jvm.JVMPluginContainer
-
- All Implemented Interfaces:
PluginContainer
,ResourceQueryable
public class JVMPluginContainer extends Object implements PluginContainer
-
-
Constructor Summary
Constructors Constructor Description JVMPluginContainer(PluginCandidate<JVMPluginResource> candidate)
JVMPluginContainer(PluginCandidate<JVMPluginResource> candidate, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object that)
int
hashCode()
protected void
initializeInstance(Object instance)
Object
instance()
Optional<URI>
locateResource(URI relative)
Resolves the location of a bundled resource, given a relativeURI
.Logger
logger()
org.spongepowered.plugin.metadata.PluginMetadata
metadata()
String
toString()
protected StringJoiner
toStringJoiner()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.spongepowered.plugin.ResourceQueryable
openResource
-
-
-
-
Constructor Detail
-
JVMPluginContainer
public JVMPluginContainer(PluginCandidate<JVMPluginResource> candidate)
-
JVMPluginContainer
public JVMPluginContainer(PluginCandidate<JVMPluginResource> candidate, Logger logger)
-
-
Method Detail
-
metadata
public final org.spongepowered.plugin.metadata.PluginMetadata metadata()
- Specified by:
metadata
in interfacePluginContainer
- Returns:
- The
plugin metadata
-
logger
public final Logger logger()
- Specified by:
logger
in interfacePluginContainer
- Returns:
- The
Logger
(typically mapped toPluginMetadata.id()
)
-
instance
public final Object instance()
- Specified by:
instance
in interfacePluginContainer
- Returns:
- The instance
-
initializeInstance
protected void initializeInstance(Object instance)
-
locateResource
public Optional<URI> locateResource(URI relative)
Description copied from interface:ResourceQueryable
Resolves the location of a bundled resource, given a relativeURI
.- Specified by:
locateResource
in interfaceResourceQueryable
- Parameters:
relative
- The relative URI- Returns:
- The resolved resource location, if available
-
toStringJoiner
protected StringJoiner toStringJoiner()
-
-