@HashCodeAndEqualsPlugin.Enhance public static class Plugin.Engine.Target.InMemory extends java.lang.Object implements Plugin.Engine.Target, Plugin.Engine.Target.Sink
Plugin.Engine.Target.Discarding, Plugin.Engine.Target.ForFolder, Plugin.Engine.Target.ForJarFile, Plugin.Engine.Target.InMemory, Plugin.Engine.Target.SinkPlugin.Engine.Target.Sink.ForJarOutputStream| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,byte[]> |
storage
The map for storing all elements being received.
|
| Constructor and Description |
|---|
InMemory()
Creates a new in-memory storage.
|
InMemory(java.util.Map<java.lang.String,byte[]> storage)
Creates a new in-memory storage.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.util.Map<java.lang.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(java.util.Map<TypeDescription,byte[]> binaryRepresentations)
Stores the supplied binary representation of types in this sink.
|
java.util.Map<java.lang.String,byte[]> |
toTypeMap()
Returns the in-memory storage as a type-map where all non-class files are discarded.
|
Plugin.Engine.Target.Sink |
write(java.util.jar.Manifest manifest)
Initializes this target prior to writing.
|
private final java.util.Map<java.lang.String,byte[]> storage
public InMemory()
public InMemory(java.util.Map<java.lang.String,byte[]> storage)
storage - The map for storing all elements being received.public Plugin.Engine.Target.Sink write(java.util.jar.Manifest manifest) throws java.io.IOException
write in interface Plugin.Engine.Targetmanifest - The manifest for the target or null if no manifest was found.java.io.IOException - If an I/O error occurs.public void store(java.util.Map<TypeDescription,byte[]> binaryRepresentations)
store in interface Plugin.Engine.Target.SinkbinaryRepresentations - The binary representations to store.public void retain(Plugin.Engine.Source.Element element) throws java.io.IOException
retain in interface Plugin.Engine.Target.Sinkelement - The element to retain.java.io.IOException - If an I/O error occurs.public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.util.Map<java.lang.String,byte[]> getStorage()
public java.util.Map<java.lang.String,byte[]> toTypeMap()