Package net.bytebuddy.build
Class Plugin.Engine.Source.ForFolder
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Source.ForFolder
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.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 java.lang.Object implements Plugin.Engine.Source, Plugin.Engine.Source.Origin
Represents the contents of a folder as class files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classPlugin.Engine.Source.ForFolder.FolderIteratorAn 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.Element, Plugin.Engine.Source.Empty, Plugin.Engine.Source.Filtering, Plugin.Engine.Source.ForFolder, Plugin.Engine.Source.ForJarFile, Plugin.Engine.Source.InMemory, Plugin.Engine.Source.Origin
-
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.io.FilefolderThe folder to represent.-
Fields inherited from interface net.bytebuddy.build.Plugin.Engine.Source.Origin
NO_MANIFEST
-
-
Constructor Summary
Constructors Constructor Description ForFolder(java.io.File folder)Creates a new source representation for a given folder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ClassFileLocatorgetClassFileLocator()Returns a class file locator for the represented source.java.util.jar.ManifestgetManifest()Returns the manifest file of the source location ornullif no manifest exists.java.util.Iterator<Plugin.Engine.Source.Element>iterator()Plugin.Engine.Source.Originread()Initializes a reading from this source.
-
-
-
Method Detail
-
read
public Plugin.Engine.Source.Origin read()
Initializes a reading from this source.- Specified by:
readin interfacePlugin.Engine.Source- Returns:
- A source that represents the resource of this origin.
-
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:
getClassFileLocatorin interfacePlugin.Engine.Source.Origin- Returns:
- A class file locator for locating class files of this instance..
-
getManifest
public java.util.jar.Manifest getManifest() throws java.io.IOExceptionReturns 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:
java.io.IOException- If an I/O error occurs.
-
iterator
public java.util.Iterator<Plugin.Engine.Source.Element> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<Plugin.Engine.Source.Element>
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-