Package net.bytebuddy.build
Class Plugin.Engine.Source.Compound.Origin
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Source.Compound.Origin
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Plugin.Engine.Source.Element>
,Plugin.Engine.Source.Origin
- Enclosing class:
Plugin.Engine.Source.Compound
@Enhance
protected static class Plugin.Engine.Source.Compound.Origin
extends Object
implements Plugin.Engine.Source.Origin
Implements a compound
Plugin.Engine.Source.Origin
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A compound iterator that combines several iterables.Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
Plugin.Engine.Source.Origin.Filtering, Plugin.Engine.Source.Origin.ForJarFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<Plugin.Engine.Source.Origin> A list of represented origins.Fields inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
NO_MANIFEST
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Origin
(List<Plugin.Engine.Source.Origin> origins) Creates a new compound origin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Returns the manifest file of the source location ornull
if no manifest exists.iterator()
toClassFileLocator
(ClassFileVersion classFileVersion) Creates a class file locator for the represented source.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
-
Field Details
-
origins
A list of represented origins.
-
-
Constructor Details
-
Origin
Creates a new compound origin.- Parameters:
origins
- A list of represented origins.
-
-
Method Details
-
getManifest
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.
-
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:
toClassFileLocator
in interfacePlugin.Engine.Source.Origin
- Parameters:
classFileVersion
- The class file version to consider for multi-release jars ornull
if 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.
-
iterator
- Specified by:
iterator
in interfaceIterable<Plugin.Engine.Source.Element>
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-