Package net.bytebuddy.build
Class Plugin.Engine.Source.ForFolder
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Source.ForFolder
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Plugin.Engine.Source.Element>,Plugin.Engine.Source,Plugin.Engine.Source.Origin
- Enclosing interface:
Plugin.Engine.Source
@Enhance
public static class Plugin.Engine.Source.ForFolder
extends Object
implements Plugin.Engine.Source, Plugin.Engine.Source.Origin
Represents the contents of a folder as class files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAn iterator that exposes all files within a folder structure as elements.Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Source
Plugin.Engine.Source.Compound, Plugin.Engine.Source.Element, Plugin.Engine.Source.Empty, Plugin.Engine.Source.Filtering, Plugin.Engine.Source.ForFolder, Plugin.Engine.Source.ForJarFile, Plugin.Engine.Source.InMemory, Plugin.Engine.Source.OriginNested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
Plugin.Engine.Source.Origin.Filtering, Plugin.Engine.Source.Origin.ForJarFile -
Field Summary
FieldsFields inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
NO_MANIFEST -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
folder
The folder to represent.
-
-
Constructor Details
-
ForFolder
Creates a new source representation for a given folder.- Parameters:
folder- The folder to represent.
-
-
Method Details
-
read
Initializes a reading from this source.- Specified by:
readin interfacePlugin.Engine.Source- Returns:
- A source that represents the resource of this origin.
-
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:
getClassFileLocatorin interfacePlugin.Engine.Source.Origin- Returns:
- A class file locator for locating class files of this instance..
-
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.
-
iterator
- Specified by:
iteratorin interfaceIterable<Plugin.Engine.Source.Element>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-