Package net.bytebuddy.build
Class Plugin.Engine.Source.Origin.ForJarFile
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Source.Origin.ForJarFile
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Plugin.Engine.Source.Element>
,Plugin.Engine.Source.Origin
- Enclosing interface:
- Plugin.Engine.Source.Origin
public static class Plugin.Engine.Source.Origin.ForJarFile extends Object implements Plugin.Engine.Source.Origin
An origin implementation for a jar file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Plugin.Engine.Source.Origin.ForJarFile.JarFileIterator
An iterator for jar file entries.-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
Plugin.Engine.Source.Origin.ForJarFile
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
NO_MANIFEST
-
-
Constructor Summary
Constructors Constructor Description ForJarFile(JarFile file)
Creates a new origin for a jar file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ClassFileLocator
getClassFileLocator()
Returns a class file locator for the represented source.Manifest
getManifest()
Returns the manifest file of the source location ornull
if no manifest exists.Iterator<Plugin.Engine.Source.Element>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ForJarFile
public ForJarFile(JarFile file)
Creates a new origin for a jar file.- Parameters:
file
- The represented file.
-
-
Method Detail
-
getManifest
public Manifest getManifest() throws IOException
Returns the manifest file of the source location ornull
if no manifest exists.- Specified by:
getManifest
in interfacePlugin.Engine.Source.Origin
- Returns:
- This source's manifest or
null
. - Throws:
IOException
- If an I/O error occurs.
-
getClassFileLocator
public ClassFileLocator getClassFileLocator()
Returns a class file locator for the represented source. If the class file locator needs to be closed, it is the responsibility of this origin to close the locator or its underlying resources.- Specified by:
getClassFileLocator
in interfacePlugin.Engine.Source.Origin
- Returns:
- A class file locator for locating class files of this instance..
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
iterator
public Iterator<Plugin.Engine.Source.Element> iterator()
- Specified by:
iterator
in interfaceIterable<Plugin.Engine.Source.Element>
-
-