public static ClassLoader getDefaultClassLoader ( Class < ? > clazz ) { ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( classLoader == null ) { classLoader = clazz . getClassLoader ( ) ; } return classLoader ; }
Determines the default classloader . That is context class loader if defined or else classloader which loaded the given class .