Package net.bytebuddy.build
Class Plugin.Engine.Target.ForFolder
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Target.ForFolder
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Plugin.Engine.Target
,Plugin.Engine.Target.Sink
- Enclosing interface:
- Plugin.Engine.Target
@Enhance public static class Plugin.Engine.Target.ForFolder extends java.lang.Object implements Plugin.Engine.Target, Plugin.Engine.Target.Sink
Represents a folder as the target for a plugin engine's application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
Plugin.Engine.Target.ForFolder.Dispatcher
A dispatcher that allows for file copy operations based on NIO2 if available.-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Target
Plugin.Engine.Target.Discarding, Plugin.Engine.Target.ForFolder, Plugin.Engine.Target.ForJarFile, Plugin.Engine.Target.InMemory, Plugin.Engine.Target.Sink
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Target.Sink
Plugin.Engine.Target.Sink.ForJarOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected static Plugin.Engine.Target.ForFolder.Dispatcher
DISPATCHER
A dispatcher for using NIO2 if the current VM supports it.private java.io.File
folder
The folder that is represented by this instance.
-
Constructor Summary
Constructors Constructor Description ForFolder(java.io.File folder)
Creates a new target for a folder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
retain(Plugin.Engine.Source.Element element)
Retains the supplied element in its original form.void
store(java.util.Map<TypeDescription,byte[]> binaryRepresentations)
Stores the supplied binary representation of types in this sink.Plugin.Engine.Target.Sink
write(java.util.jar.Manifest manifest)
Initializes this target prior to writing.
-
-
-
Field Detail
-
DISPATCHER
protected static final Plugin.Engine.Target.ForFolder.Dispatcher DISPATCHER
A dispatcher for using NIO2 if the current VM supports it.
-
folder
private final java.io.File folder
The folder that is represented by this instance.
-
-
Method Detail
-
write
public Plugin.Engine.Target.Sink write(java.util.jar.Manifest manifest) throws java.io.IOException
Initializes this target prior to writing.- Specified by:
write
in interfacePlugin.Engine.Target
- Parameters:
manifest
- The manifest for the target ornull
if no manifest was found.- Returns:
- The sink to write to.
- Throws:
java.io.IOException
- If an I/O error occurs.
-
store
public void store(java.util.Map<TypeDescription,byte[]> binaryRepresentations) throws java.io.IOException
Stores the supplied binary representation of types in this sink.- Specified by:
store
in interfacePlugin.Engine.Target.Sink
- Parameters:
binaryRepresentations
- The binary representations to store.- Throws:
java.io.IOException
- If an I/O error occurs.
-
retain
public void retain(Plugin.Engine.Source.Element element) throws java.io.IOException
Retains the supplied element in its original form.- Specified by:
retain
in interfacePlugin.Engine.Target.Sink
- Parameters:
element
- The element to retain.- Throws:
java.io.IOException
- If an I/O error occurs.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-