Interface IHasClassLoader

  • All Known Implementing Classes:
    ClassPathResource
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IHasClassLoader
    Base interface for all objects having optional support for custom ClassLoader objects.
    Note: when you implement this interface and want to have a ClassLoader as a member, please consider storing it as a WeakReference to avoid potential memory leaks.
    Author:
    Philip Helger
    • Method Detail

      • getClassLoader

        @Nullable
        ClassLoader getClassLoader()
        Returns:
        The class loader to use. May be null.
      • hasClassLoader

        default boolean hasClassLoader()
        Check if this object has a custom class loader or not.
        Returns:
        true if a class loader is present, false if not.
        Since:
        9.0.0
        See Also:
        getClassLoader()