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 ClassesModifier and TypeClassDescriptionprotected classAn iterator for jar file entries.Nested classes/interfaces inherited from interface Plugin.Engine.Source.Origin
Plugin.Engine.Source.Origin.Filtering, Plugin.Engine.Source.Origin.ForJarFile -
Field Summary
FieldsFields inherited from interface Plugin.Engine.Source.Origin
NO_MANIFEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the manifest file of the source location ornullif no manifest exists.iterator()toClassFileLocator(ClassFileVersion classFileVersion) Creates a class file locator for the represented source.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
file
The represented file.
-
-
Constructor Details
-
ForJarFile
Creates a new origin for a jar file.- Parameters:
file- The represented file.
-
-
Method Details
-
getManifest
Returns the manifest file of the source location ornullif no manifest exists.- Specified by:
getManifestin interfacePlugin.Engine.Source.Origin- Returns:
- This source's manifest or
null. - Throws:
IOException- If an I/O error occurs.
-
toClassFileLocator
public ClassFileLocator toClassFileLocator(@MaybeNull ClassFileVersion classFileVersion) throws IOException Creates 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:
toClassFileLocatorin interfacePlugin.Engine.Source.Origin- Parameters:
classFileVersion- The class file version to consider for multi-release jars ornullif multi-release jars should not be considered.- Returns:
- A class file locator for locating class files of this instance.
- Throws:
IOException- If an I/O exception occurs.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
iterator
- Specified by:
iteratorin interfaceIterable<Plugin.Engine.Source.Element>
-