Class Plugin.Engine.Target.ForFolder
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Target.ForFolder
- All Implemented Interfaces:
Closeable, AutoCloseable, Plugin.Engine.Target, Plugin.Engine.Target.Sink
- Enclosing interface:
Plugin.Engine.Target
@Enhance
public static class Plugin.Engine.Target.ForFolder
extends 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/interfaces inherited from interface Plugin.Engine.Target
Plugin.Engine.Target.Discarding, Plugin.Engine.Target.ForFolder, Plugin.Engine.Target.ForJarFile, Plugin.Engine.Target.InMemory, Plugin.Engine.Target.SinkNested classes/interfaces inherited from interface Plugin.Engine.Target.Sink
Plugin.Engine.Target.Sink.ForJarOutputStream -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static voiddoStore(File folder, Map<TypeDescription, byte[]> binaryRepresentations) Stores binary representations to a folder.voidretain(Plugin.Engine.Source.Element element) Retains the supplied element in its original form.voidstore(Map<TypeDescription, byte[]> binaryRepresentations) Stores the supplied binary representation of types in this sink.voidstore(ClassFileVersion classFileVersion, Map<TypeDescription, byte[]> binaryRepresentations) Stores the supplied binary representation of types in this sink.Initializes this target prior to writing.
-
Field Details
-
folder
The folder that is represented by this instance. -
link
private final boolean linktrueif retained files should be linked and not copied.
-
-
Constructor Details
-
ForFolder
Creates a new target for a folder.- Parameters:
folder- The folder that is represented by this instance.
-
ForFolder
Creates a new target for a folder.- Parameters:
folder- The folder that is represented by this instance.link-trueif retained files should be linked and not copied.
-
-
Method Details
-
doStore
private static void doStore(File folder, Map<TypeDescription, byte[]> binaryRepresentations) throws IOException Stores binary representations to a folder.- Parameters:
folder- The base folder.binaryRepresentations- The binary representations to store.- Throws:
IOException- If an I/O exception occurs.
-
write
Initializes this target prior to writing.- Specified by:
writein interfacePlugin.Engine.Target- Parameters:
manifest- The manifest for the target ornullif no manifest was found.- Returns:
- The sink to write to.
- Throws:
IOException- If an I/O error occurs.
-
store
Stores the supplied binary representation of types in this sink.- Specified by:
storein interfacePlugin.Engine.Target.Sink- Parameters:
binaryRepresentations- The binary representations to store.- Throws:
IOException- If an I/O error occurs.
-
store
public void store(ClassFileVersion classFileVersion, Map<TypeDescription, byte[]> binaryRepresentations) throws IOException Stores the supplied binary representation of types in this sink.- Specified by:
storein interfacePlugin.Engine.Target.Sink- Parameters:
classFileVersion- The version of the multi-release jar file, which should at least be8as previous versions are not recognized by regular class loaders.binaryRepresentations- The binary representations to store.- Throws:
IOException- If an I/O error occurs.
-
retain
Retains the supplied element in its original form.- Specified by:
retainin interfacePlugin.Engine.Target.Sink- Parameters:
element- The element to retain.- Throws:
IOException- If an I/O error occurs.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-