public static class Plugin.Engine.Source.InMemory extends Object implements Plugin.Engine.Source
Modifier and Type | Class and Description |
---|---|
protected static class |
Plugin.Engine.Source.InMemory.MapEntryIterator
An iterator that represents map entries as sources.
|
Plugin.Engine.Source.Element, Plugin.Engine.Source.Empty, Plugin.Engine.Source.ForFolder, Plugin.Engine.Source.ForJarFile, Plugin.Engine.Source.InMemory
NO_MANIFEST
Constructor and Description |
---|
InMemory(Map<String,byte[]> storage)
Creates a new in-memory source.
|
InMemory(String name,
byte[] binaryRepresentation)
Creates a new in-memory source with a single entry.
|
Modifier and Type | Method and Description |
---|---|
ClassFileLocator |
getClassFileLocator()
Returns a class file locator for the represented source.
|
Manifest |
getManifest()
Returns the manifest file of the source location or
null if no manifest exists. |
Iterator<Plugin.Engine.Source.Element> |
iterator() |
static Plugin.Engine.Source |
ofTypes(Map<String,byte[]> binaryRepresentations)
Represents a map of type names to their binary representation as an in-memory source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public InMemory(String name, byte[] binaryRepresentation)
name
- The name of the only resource.binaryRepresentation
- The resource's binary representation.public static Plugin.Engine.Source ofTypes(Map<String,byte[]> binaryRepresentations)
binaryRepresentations
- A mapping of type names to their binary representation.public ClassFileLocator getClassFileLocator()
getClassFileLocator
in interface Plugin.Engine.Source
public Manifest getManifest() throws IOException
null
if no manifest exists.getManifest
in interface Plugin.Engine.Source
null
.IOException
- If an I/O error occurs.public Iterator<Plugin.Engine.Source.Element> iterator()
iterator
in interface Iterable<Plugin.Engine.Source.Element>
Copyright © 2014–2018. All rights reserved.