public static enum ByteArrayClassLoader.PersistenceHandler extends Enum<ByteArrayClassLoader.PersistenceHandler>
ClassLoader.getResourceAsStream(String) method.| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction
An action to define a URL that represents a class file. 
 | 
| Enum Constant and Description | 
|---|
LATENT
The latent persistence handler hides all class file representations and does not make them accessible
 even before they are loaded. 
 | 
MANIFEST
The manifest persistence handler retains all class file representations and makes them accessible. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
isManifest()
Checks if this persistence handler represents manifest class file storage. 
 | 
protected abstract byte[] | 
lookup(String name,
      ConcurrentMap<String,byte[]> typeDefinitions)
Performs a lookup of a class file by its name. 
 | 
protected abstract void | 
release(String name,
       ConcurrentMap<String,byte[]> typeDefinitions)
Removes the binary representation of the supplied type if this class loader is latent. 
 | 
protected abstract URL | 
url(String resourceName,
   ConcurrentMap<String,byte[]> typeDefinitions)
Returns a URL representing a class file. 
 | 
static ByteArrayClassLoader.PersistenceHandler | 
valueOf(String name)
Returns the enum constant of this type with the specified name. 
 | 
static ByteArrayClassLoader.PersistenceHandler[] | 
values()
Returns an array containing the constants of this enum type, in
the order they are declared. 
 | 
public static final ByteArrayClassLoader.PersistenceHandler MANIFEST
public static final ByteArrayClassLoader.PersistenceHandler LATENT
public static ByteArrayClassLoader.PersistenceHandler[] values()
for (ByteArrayClassLoader.PersistenceHandler c : ByteArrayClassLoader.PersistenceHandler.values()) System.out.println(c);
public static ByteArrayClassLoader.PersistenceHandler valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isManifest()
true if this persistence handler represents manifest class file storage.protected abstract byte[] lookup(String name, ConcurrentMap<String,byte[]> typeDefinitions)
name - The name of the class to be loaded.typeDefinitions - A map of fully qualified class names pointing to their binary representations.null if no such class is known.protected abstract URL url(String resourceName, ConcurrentMap<String,byte[]> typeDefinitions)
resourceName - The name of the requested resource.typeDefinitions - A mapping of byte arrays by their type names.null if the requested resource does not represent a class file.protected abstract void release(String name, ConcurrentMap<String,byte[]> typeDefinitions)
name - The name of the type.typeDefinitions - A mapping of byte arrays by their type names.Copyright © 2014–2021. All rights reserved.