protected static class ClassLoadingStrategy.Default.WrappingDispatcher extends Object implements ClassLoadingStrategy.Configurable
ProtectionDomain
on class loading.ClassLoadingStrategy.Configurable, ClassLoadingStrategy.Default, ClassLoadingStrategy.ForBootstrapInjection
Modifier | Constructor and Description |
---|---|
protected |
WrappingDispatcher(ByteArrayClassLoader.PersistenceHandler persistenceHandler,
boolean childFirst)
Creates a new wrapping dispatcher with a default protection domain and a default access control context.
|
Modifier and Type | Method and Description |
---|---|
ClassLoadingStrategy.Configurable |
allowExistingTypes()
Determines if this class loading strategy should not throw an exception when attempting to load a class that
was already loaded.
|
boolean |
equals(Object other) |
int |
hashCode() |
Map<TypeDescription,Class<?>> |
load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types)
Loads a given collection of classes given their binary representation.
|
String |
toString() |
ClassLoadingStrategy.Configurable |
withAccessControlContext(AccessControlContext accessControlContext)
Defines the supplied access control context to be used for loading classes.
|
ClassLoadingStrategy.Configurable |
withPackageDefinitionStrategy(PackageDefinitionStrategy packageDefinitionStrategy)
Defines the supplied package definition strategy to be used for defining packages.
|
ClassLoadingStrategy.Configurable |
withProtectionDomain(ProtectionDomain protectionDomain)
Overrides the implicitly set default
ProtectionDomain with an explicit one. |
protected WrappingDispatcher(ByteArrayClassLoader.PersistenceHandler persistenceHandler, boolean childFirst)
persistenceHandler
- The persistence handler to apply.childFirst
- true
if the created class loader should apply child-first semantics.public Map<TypeDescription,Class<?>> load(ClassLoader classLoader, Map<TypeDescription,byte[]> types)
ClassLoadingStrategy
load
in interface ClassLoadingStrategy
classLoader
- The class loader to used for loading the classes.types
- Byte array representations of the types to be loaded mapped by their descriptions,
where an iteration order defines an order in which they are supposed to be loaded,
if relevant.public ClassLoadingStrategy.Configurable withProtectionDomain(ProtectionDomain protectionDomain)
ClassLoadingStrategy.Configurable
ProtectionDomain
with an explicit one.withProtectionDomain
in interface ClassLoadingStrategy.Configurable
protectionDomain
- The protection domain to apply.ProtectionDomain
.public ClassLoadingStrategy.Configurable withPackageDefinitionStrategy(PackageDefinitionStrategy packageDefinitionStrategy)
ClassLoadingStrategy.Configurable
withPackageDefinitionStrategy
in interface ClassLoadingStrategy.Configurable
packageDefinitionStrategy
- The package definer to be used.public ClassLoadingStrategy.Configurable withAccessControlContext(AccessControlContext accessControlContext)
ClassLoadingStrategy.Configurable
withAccessControlContext
in interface ClassLoadingStrategy.Configurable
accessControlContext
- The access control context to use for loading classes.public ClassLoadingStrategy.Configurable allowExistingTypes()
ClassLoadingStrategy.Configurable
allowExistingTypes
in interface ClassLoadingStrategy.Configurable
Copyright © 2014–2016. All rights reserved.