Package org.apache.lucene.util
Interface ClassLoaderUtils
public interface ClassLoaderUtils
Helper class used by ServiceLoader to investigate parent/child relationships of
ClassLoaders.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleanisParentClassLoader(ClassLoader parent, ClassLoader child) Utility method to check if some class loader is a (grand-)parent of or the same as another one.
-
Method Details
-
isParentClassLoader
Utility method to check if some class loader is a (grand-)parent of or the same as another one. This means the child will be able to load all classes from the parent, too.If caller's codesource doesn't have enough permissions to do the check,
falseis returned (this is fine, because if we get aSecurityExceptionit is for sure no parent).
-