static Class < ? > loadType ( String fullName ) throws ClassNotFoundException { try { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; return loader != null ? loader . loadClass ( fullName ) : Class . forName ( fullName ) ; } catch ( ClassNotFoundException ex ) { return loadPrimitiveType ( fullName , ex ) ; } }
loads a type avoiding nulls context class loader if available