public static List < ClassLoader > getClassLoaders ( ) { ClassLoader [ ] classLoaders = new ClassLoader [ 2 ] ; classLoaders [ 0 ] = FileUtils . class . getClassLoader ( ) ; classLoaders [ 1 ] = Thread . currentThread ( ) . getContextClassLoader ( ) ; // Clean up possible null values. Note that #getClassLoader may return a null value. List < ClassLoader > loaders = new ArrayList < ClassLoader > ( classLoaders . length ) ; for ( ClassLoader classLoader : classLoaders ) { if ( classLoader != null ) { loaders . add ( classLoader ) ; } } return loaders ; }
Returns default classloaders .