Class JVMPluginResource
- java.lang.Object
-
- org.spongepowered.plugin.builtin.jvm.locator.JVMPluginResource
-
- All Implemented Interfaces:
PluginResource
,ResourceQueryable
public class JVMPluginResource extends Object implements PluginResource
-
-
Constructor Summary
Constructors Constructor Description JVMPluginResource(String locator, ResourceType type, Path path, @Nullable Manifest manifest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSystem
fileSystem()
Optional<URI>
locateResource(URI relative)
Resolves the location of a bundled resource, given a relativeURI
.String
locator()
Optional<Manifest>
manifest()
Path
path()
Optional<String>
property(String key)
String
toString()
protected StringJoiner
toStringJoiner()
ResourceType
type()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.spongepowered.plugin.ResourceQueryable
openResource
-
-
-
-
Constructor Detail
-
JVMPluginResource
public JVMPluginResource(String locator, ResourceType type, Path path, @Nullable Manifest manifest)
-
-
Method Detail
-
locator
public final String locator()
- Specified by:
locator
in interfacePluginResource
- Returns:
- The name of the
service
that located this resource
-
path
public final Path path()
- Specified by:
path
in interfacePluginResource
- Returns:
- The path where this resource originates from
-
property
public Optional<String> property(String key)
Description copied from interface:PluginResource
- Specified by:
property
in interfacePluginResource
- Parameters:
key
- The key- Returns:
- The value or
Optional.empty()
if not found
-
type
public final ResourceType type()
-
locateResource
public final 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
-
fileSystem
public FileSystem fileSystem()
-
toStringJoiner
protected StringJoiner toStringJoiner()
-
-