java.lang.Object
javax.ide.extension.spi.JARExtensionSource
- All Implemented Interfaces:
- ExtensionSource
- public class JARExtensionSource
- extends java.lang.Object
- implements ExtensionSource
A default implementation of ExtensionSource which loads an extension
manifest from the META-INF/extension.xml entry of a JAR file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MANIFEST_ENTRY
private static final java.lang.String MANIFEST_ENTRY
- See Also:
- Constant Field Values
MANIFEST_ALT_ENTRY
private static final java.lang.String MANIFEST_ALT_ENTRY
- See Also:
- Constant Field Values
_jarURI
private final java.net.URI _jarURI
_manifestURI
private java.net.URI _manifestURI
JARExtensionSource
public JARExtensionSource(java.net.URI jarURI)
getURI
public final java.net.URI getURI()
- Get the URI of this JAR file.
- Specified by:
getURI
in interface ExtensionSource
getClasspathEntry
public final java.net.URI getClasspathEntry()
- Description copied from interface:
ExtensionSource
- Get the classpath entry for this extension source. This is the
(optional) entry that should be added to the classpath prior to
processing this extension.
- Specified by:
getClasspathEntry
in interface ExtensionSource
getManifestURI
public java.net.URI getManifestURI()
- Get the URI of the manifest file within the extension source.
- Specified by:
getManifestURI
in interface ExtensionSource
resolvePath
public java.net.URI resolvePath(javax.ide.extension.Extension extension,
java.lang.String path)
- Resolve a relative path from the manifest file. For JAR sources, the
path may either be within the JAR (if the path starts with a /),
or relative to the location of the jar file otherwise.
- Specified by:
resolvePath
in interface ExtensionSource
getName
public java.lang.String getName()
- Get the name of this source. This will be used to present the source
in human readable messages.
This implementation returns the result of calling
VirtualFileSytem.toDisplayString() on the jar URI.
- Specified by:
getName
in interface ExtensionSource
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Description copied from interface:
ExtensionSource
- Get an input stream for this sources manifest.
- Specified by:
getInputStream
in interface ExtensionSource