Class FilteredClassLoader

    • Constructor Detail

      • FilteredClassLoader

        public FilteredClassLoader​(Class<?>... hiddenClasses)
        Create a FilteredClassLoader that hides the given classes.
        Parameters:
        hiddenClasses - the classes to hide
      • FilteredClassLoader

        public FilteredClassLoader​(ClassLoader parent,
                                   Class<?>... hiddenClasses)
        Create a FilteredClassLoader that hides the given classes.
        Parameters:
        parent - Parent class loader.
        hiddenClasses - the classes to hide
      • FilteredClassLoader

        @SafeVarargs
        public FilteredClassLoader​(ClassLoader parent,
                                   Predicate<String>... filters)
        Create a FilteredClassLoader that filters based on the given predicate.
        Parameters:
        parent - Parent class loader.
        filters - a set of filters to determine when a class name or resource should be hidden. A result of true indicates a filtered class or resource. The input of the predicate can either be the binary name of a class or a resource name.
      • FilteredClassLoader

        public FilteredClassLoader​(ClassLoader parent,
                                   String... hiddenPackages)
        Create a FilteredClassLoader that hides classes from the given packages.
        Parameters:
        parent - Parent class loader.
        hiddenPackages - the packages to hide
      • FilteredClassLoader

        @SafeVarargs
        public FilteredClassLoader​(Predicate<String>... filters)
        Create a FilteredClassLoader that filters based on the given predicate.
        Parameters:
        filters - a set of filters to determine when a class name or resource should be hidden. A result of true indicates a filtered class or resource. The input of the predicate can either be the binary name of a class or a resource name.
      • FilteredClassLoader

        public FilteredClassLoader​(String... hiddenPackages)
        Create a FilteredClassLoader that hides classes from the given packages.
        Parameters:
        hiddenPackages - the packages to hide