类 DecoratingClassLoader

java.lang.Object
java.lang.ClassLoader
cn.taketoday.core.DecoratingClassLoader
直接已知子类:
OverridingClassLoader

public abstract class DecoratingClassLoader extends ClassLoader
Base class for decorating ClassLoaders such as OverridingClassLoader providing common handling of excluded packages and classes.
从以下版本开始:
4.0
作者:
Juergen Hoeller, Rod Johnson, TODAY 2021/9/11 12:10
  • 字段详细资料

    • excludedPackages

      private final Set<String> excludedPackages
    • excludedClasses

      private final Set<String> excludedClasses
  • 构造器详细资料

    • DecoratingClassLoader

      public DecoratingClassLoader()
      Create a new DecoratingClassLoader with no parent ClassLoader.
    • DecoratingClassLoader

      public DecoratingClassLoader(@Nullable ClassLoader parent)
      Create a new DecoratingClassLoader using the given parent ClassLoader for delegation.
  • 方法详细资料

    • excludePackage

      public void excludePackage(String packageName)
      Add a package name to exclude from decoration (e.g. overriding).

      Any class whose fully-qualified name starts with the name registered here will be handled by the parent ClassLoader in the usual fashion.

      参数:
      packageName - the package name to exclude
    • excludeClass

      public void excludeClass(String className)
      Add a class name to exclude from decoration (e.g. overriding).

      Any class name registered here will be handled by the parent ClassLoader in the usual fashion.

      参数:
      className - the class name to exclude
    • isExcluded

      protected boolean isExcluded(String className)
      Determine whether the specified class is excluded from decoration by this class loader.

      The default implementation checks against excluded packages and classes.

      参数:
      className - the class name to check
      返回:
      whether the specified class is eligible
      另请参阅: