Class Reflections


  • public final class Reflections
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.ClassLoader[] classLoaders​(java.lang.ClassLoader... classLoaders)
      Returns an array of class loaders initialized from the specified array.
      static java.lang.ClassLoader contextClassLoader()
      Gets the current thread context class loader (TCCL).
      static ReflectionScanner loadScanner()  
      static java.lang.ClassLoader staticClassLoader()
      Gets the class loader of this library.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • contextClassLoader

        public static java.lang.ClassLoader contextClassLoader()
        Gets the current thread context class loader (TCCL).
        Returns:
        the context class loader, may be null
      • staticClassLoader

        public static java.lang.ClassLoader staticClassLoader()
        Gets the class loader of this library.
        Returns:
        the static library class loader, may be null
      • classLoaders

        public static java.lang.ClassLoader[] classLoaders​(java.lang.ClassLoader... classLoaders)
        Returns an array of class loaders initialized from the specified array.

        If the input is null or empty, it defaults to both contextClassLoader() and staticClassLoader()

        Parameters:
        classLoaders - Given class loaders
        Returns:
        the array of class loaders, not null