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.
  • Method Details

    • with

      Overrides the implicitly set default ProtectionDomain with an explicit one.
      Parameters:
      protectionDomain - The protection domain to apply or null 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

      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.