Class ClassLoadingStrategy.Default.WrappingDispatcher

java.lang.Object
net.bytebuddy.dynamic.loading.ClassLoadingStrategy.Default.WrappingDispatcher
All Implemented Interfaces:
ClassLoadingStrategy<ClassLoader>, ClassLoadingStrategy.Configurable<ClassLoader>
Enclosing class:
ClassLoadingStrategy.Default

@Enhance protected static class ClassLoadingStrategy.Default.WrappingDispatcher extends Object implements ClassLoadingStrategy.Configurable<ClassLoader>
A class loading strategy which creates a wrapping class loader while applying a given ProtectionDomain on class loading.
  • Field Details

    • CHILD_FIRST

      private static final boolean CHILD_FIRST
      Indicates that a child first loading strategy should be attempted.
      See Also:
    • PARENT_FIRST

      private static final boolean PARENT_FIRST
      Indicates that a parent first loading strategy should be attempted.
      See Also:
    • protectionDomain

      The protection domain to apply or null if no protection domain is set.
    • persistenceHandler

      private final ByteArrayClassLoader.PersistenceHandler persistenceHandler
      The persistence handler to apply.
    • packageDefinitionStrategy

      private final PackageDefinitionStrategy packageDefinitionStrategy
      The package definer to be used for querying information on package information.
    • childFirst

      private final boolean childFirst
      true if the created class loader should apply child-first semantics.
    • forbidExisting

      private final boolean forbidExisting
      Determines if an exception should be thrown when attempting to load a type that already exists.
    • sealed

      private final boolean sealed
      true if the class loader should be sealed.
  • Constructor Details

    • WrappingDispatcher

      protected WrappingDispatcher(ByteArrayClassLoader.PersistenceHandler persistenceHandler, boolean childFirst)
      Creates a new wrapping dispatcher with a default protection domain and a default access control context.
      Parameters:
      persistenceHandler - The persistence handler to apply.
      childFirst - true if the created class loader should apply child-first semantics.
    • WrappingDispatcher

      private WrappingDispatcher(@MaybeNull ProtectionDomain protectionDomain, PackageDefinitionStrategy packageDefinitionStrategy, ByteArrayClassLoader.PersistenceHandler persistenceHandler, boolean childFirst, boolean forbidExisting, boolean sealed)
      Creates a new protection domain specific class loading wrapper.
      Parameters:
      protectionDomain - The protection domain to apply or null if no protection domain is set.
      packageDefinitionStrategy - The package definer to be used for querying information on package information.
      persistenceHandler - The persistence handler to apply.
      childFirst - true if the created class loader should apply child-first semantics.
      forbidExisting - Determines if an exception should be thrown when attempting to load a type that already exists.
      sealed - true if the class loader should be sealed.
  • Method Details