Package com.helger.commons.lang
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 customClassLoaderobjects.
Note: when you implement this interface and want to have aClassLoaderas a member, please consider storing it as aWeakReferenceto avoid potential memory leaks.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ClassLoadergetClassLoader()default booleanhasClassLoader()Check if this object has a custom class loader or not.
-
-
-
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:
trueif a class loader is present,falseif not.- Since:
- 9.0.0
- See Also:
getClassLoader()
-
-