Class JarClassPathElement
- java.lang.Object
-
- io.quarkus.bootstrap.classloading.JarClassPathElement
-
- All Implemented Interfaces:
ClassPathElement,Closeable,AutoCloseable
public class JarClassPathElement extends Object implements ClassPathElement
A class path element that represents a file on the file system
-
-
Field Summary
Fields Modifier and Type Field Description static intJAVA_VERSIONstatic StringMETA_INF_VERSIONS-
Fields inherited from interface io.quarkus.bootstrap.classloading.ClassPathElement
EMPTY
-
-
Constructor Summary
Constructors Constructor Description JarClassPathElement(Path root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ManifestgetManifest()ProtectionDomaingetProtectionDomain(ClassLoader classLoader)Set<String>getProvidedResources()Returns a set of all known resources.ClassPathResourcegetResource(String name)Loads a resource from the class path element, or null if it does not exist.PathgetRoot()static byte[]readStreamContents(InputStream inputStream)StringtoString()
-
-
-
Field Detail
-
JAVA_VERSION
public static final int JAVA_VERSION
-
META_INF_VERSIONS
public static final String META_INF_VERSIONS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JarClassPathElement
public JarClassPathElement(Path root)
-
-
Method Detail
-
getRoot
public Path getRoot()
- Specified by:
getRootin interfaceClassPathElement- Returns:
- The element root, or null if not applicable
-
getResource
public ClassPathResource getResource(String name)
Description copied from interface:ClassPathElementLoads a resource from the class path element, or null if it does not exist.- Specified by:
getResourcein interfaceClassPathElement- Parameters:
name- The resource to load- Returns:
- An representation of the class path resource if it exists
-
getProvidedResources
public Set<String> getProvidedResources()
Description copied from interface:ClassPathElementReturns a set of all known resources.- Specified by:
getProvidedResourcesin interfaceClassPathElement- Returns:
- A set representing all known resources
-
getProtectionDomain
public ProtectionDomain getProtectionDomain(ClassLoader classLoader)
- Specified by:
getProtectionDomainin interfaceClassPathElement- Returns:
- The protection domain that should be used to define classes from this element
-
getManifest
public Manifest getManifest()
- Specified by:
getManifestin interfaceClassPathElement
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
readStreamContents
public static byte[] readStreamContents(InputStream inputStream) throws IOException
- Throws:
IOException
-
-