Package net.bytebuddy.build
Class Plugin.Engine.Source.Compound.Origin
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Source.Compound.Origin
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.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 java.lang.Object implements Plugin.Engine.Source.Origin
Implements a compoundPlugin.Engine.Source.Origin
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Plugin.Engine.Source.Compound.Origin.CompoundIterator
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
Fields Modifier and Type Field Description private java.util.List<Plugin.Engine.Source.Origin>
origins
A list of represented origins.-
Fields inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
NO_MANIFEST
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Origin(java.util.List<Plugin.Engine.Source.Origin> origins)
Creates a new compound origin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.jar.Manifest
getManifest()
Returns the manifest file of the source location ornull
if no manifest exists.java.util.Iterator<Plugin.Engine.Source.Element>
iterator()
ClassFileLocator
toClassFileLocator(ClassFileVersion classFileVersion)
Creates a class file locator for the represented source.
-
-
-
Field Detail
-
origins
private final java.util.List<Plugin.Engine.Source.Origin> origins
A list of represented origins.
-
-
Constructor Detail
-
Origin
protected Origin(java.util.List<Plugin.Engine.Source.Origin> origins)
Creates a new compound origin.- Parameters:
origins
- A list of represented origins.
-
-
Method Detail
-
getManifest
public java.util.jar.Manifest getManifest() throws java.io.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:
java.io.IOException
- If an I/O error occurs.
-
toClassFileLocator
public ClassFileLocator toClassFileLocator(@MaybeNull ClassFileVersion classFileVersion) throws java.io.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:
java.io.IOException
- If an I/O exception occurs.
-
iterator
public java.util.Iterator<Plugin.Engine.Source.Element> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Plugin.Engine.Source.Element>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-