Package net.bytebuddy.dynamic.loading
Interface ClassLoadingStrategy.Configurable<S extends ClassLoader>
- Type Parameters:
S
- The least specific type of class loader this strategy can apply to.
- All Superinterfaces:
ClassLoadingStrategy<S>
- All Known Implementing Classes:
ClassLoadingStrategy.Default
,ClassLoadingStrategy.Default.InjectionDispatcher
,ClassLoadingStrategy.Default.WrappingDispatcher
- Enclosing interface:
- ClassLoadingStrategy<T extends ClassLoader>
public static interface ClassLoadingStrategy.Configurable<S extends ClassLoader>
extends ClassLoadingStrategy<S>
A
ClassLoadingStrategy
that allows configuring the strategy's behavior.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassLoadingStrategy
ClassLoadingStrategy.Configurable<S extends ClassLoader>, ClassLoadingStrategy.Default, ClassLoadingStrategy.ForBootstrapInjection, ClassLoadingStrategy.ForJnaInjection, ClassLoadingStrategy.ForUnsafeInjection, ClassLoadingStrategy.UsingLookup
-
Field Summary
Fields inherited from interface net.bytebuddy.dynamic.loading.ClassLoadingStrategy
BOOTSTRAP_LOADER, NO_PROTECTION_DOMAIN
-
Method Summary
Modifier and TypeMethodDescriptionDetermines if this class loading strategy should not throw an exception when attempting to load a class that was already loaded.opened()
With an opened class loading strategy, it is assured that types can be added to the class loader, either by indirect injection using this strategy or by creating a class loader that explicitly supports injection.with
(ProtectionDomain protectionDomain) Overrides the implicitly set defaultProtectionDomain
with an explicit one.with
(PackageDefinitionStrategy packageDefinitionStrategy) Defines the supplied package definition strategy to be used for defining packages.Methods inherited from interface net.bytebuddy.dynamic.loading.ClassLoadingStrategy
load
-
Method Details
-
with
Overrides the implicitly set defaultProtectionDomain
with an explicit one.- Parameters:
protectionDomain
- The protection domain to apply ornull
if no protection domain is set.- Returns:
- This class loading strategy with an explicitly set
ProtectionDomain
.
-
with
Defines the supplied package definition strategy to be used for defining packages.- Parameters:
packageDefinitionStrategy
- The package definer to be used.- Returns:
- A version of this class loading strategy that applies the supplied package definition strategy.
-
allowExistingTypes
ClassLoadingStrategy.Configurable<S> allowExistingTypes()Determines if this class loading strategy should not throw an exception when attempting to load a class that was already loaded. In this case, the already loaded class is used instead of the generated class.- Returns:
- A version of this class loading strategy that does not throw an exception when a class is already loaded.
-
opened
ClassLoadingStrategy.Configurable<S> opened()With an opened class loading strategy, it is assured that types can be added to the class loader, either by indirect injection using this strategy or by creating a class loader that explicitly supports injection.- Returns:
- A version of this class loading strategy that opens for future injections into a class loader.
-