Package net.bytebuddy.build
Class Plugin.Engine.Target.InMemory
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Target.InMemory
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Plugin.Engine.Target
,Plugin.Engine.Target.Sink
- Enclosing interface:
- Plugin.Engine.Target
@Enhance public static class Plugin.Engine.Target.InMemory extends Object implements Plugin.Engine.Target, Plugin.Engine.Target.Sink
A sink that stores all elements in a memory map.
-
-
Nested Class Summary
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Map<String,byte[]>
getStorage()
Returns the in-memory storage.void
retain(Plugin.Engine.Source.Element element)
Retains the supplied element in its original form.void
store(Map<TypeDescription,byte[]> binaryRepresentations)
Stores the supplied binary representation of types in this sink.Map<String,byte[]>
toTypeMap()
Returns the in-memory storage as a type-map where all non-class files are discarded.Plugin.Engine.Target.Sink
write(Manifest manifest)
Initializes this target prior to writing.
-
-
-
Method Detail
-
write
public Plugin.Engine.Target.Sink write(Manifest manifest) throws 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:
IOException
- If an I/O error occurs.
-
store
public void store(Map<TypeDescription,byte[]> binaryRepresentations)
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.
-
retain
public void retain(Plugin.Engine.Source.Element element) throws IOException
Retains the supplied element in its original form.- Specified by:
retain
in interfacePlugin.Engine.Target.Sink
- Parameters:
element
- The element to retain.- Throws:
IOException
- If an I/O error occurs.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getStorage
public Map<String,byte[]> getStorage()
Returns the in-memory storage.- Returns:
- The in-memory storage.
-
-