### Question:
GenericReflection { @Nullable public static <DATATYPE> Class <DATATYPE> getClassFromNameSafe (@Nonnull final ClassLoader aClassLoader, @Nonnull final String sName) { ValueEnforcer.notNull (aClassLoader, "ClassLoader"); try { return getClassFromName (aClassLoader, sName); } catch (final ClassNotFoundException e) { return null; } } private  GenericReflection(); @SuppressWarnings ("unchecked") static DSTTYPE uncheckedCast(@Nullable final SRCTYPE aObject); @Nonnull static Class <DATATYPE> getClassFromName(@Nonnull final ClassLoader aClassLoader,
                                                              @Nonnull final String sName); @Nonnull static Class <DATATYPE> getClassFromName(@Nonnull final String sName); @Nullable static Class <DATATYPE> getClassFromNameSafe(@Nonnull final ClassLoader aClassLoader, @Nonnull final String sName); @Nullable static Class <DATATYPE> getClassFromNameSafe(@Nonnull final String sName); @Nonnull static Class <?> [] getClassArray(@Nullable final Object... aObjs); @Nullable static RETURNTYPE invokeMethod(@Nonnull final Object aSrcObj,
                                                      @Nonnull final String sMethodName,
                                                      @Nullable final Object... aArgs); @Nullable static RETURNTYPE invokeMethod(@Nonnull final Object aSrcObj,
                                                      @Nonnull final String sMethodName,
                                                      @Nullable final Class <?> [] aArgClasses,
                                                      @Nullable final Object [] aArgs); @Nullable static RETURNTYPE invokeStaticMethod(@Nonnull final String sClassName,
                                                            @Nonnull final String sMethodName,
                                                            @Nullable final Object... aArgs); @Nullable static RETURNTYPE invokeStaticMethod(@Nonnull final Class <?> aClass,
                                                            @Nonnull final String sMethodName,
                                                            @Nullable final Object... aArgs); @Nullable static RETURNTYPE invokeStaticMethod(@Nonnull final String sClassName,
                                                            @Nonnull final String sMethodName,
                                                            @Nullable final Class <?> [] aArgClasses,
                                                            @Nullable final Object [] aArgs); @Nullable static RETURNTYPE invokeStaticMethod(@Nonnull final Class <?> aClass,
                                                            @Nonnull final String sMethodName,
                                                            @Nullable final Class <?> [] aArgClasses,
                                                            @Nullable final Object [] aArgs); @Nonnull static Constructor <DATATYPE> findConstructor(@Nonnull final DATATYPE aObj,
                                                                   final Class <?>... aCtorArgs); @Nonnull static DATATYPE newInstance(@Nonnull final DATATYPE aObj); @Nullable static DATATYPE newInstance(@Nullable final Class <? extends DATATYPE> aClass); @Nullable static DATATYPE newInstance(@Nonnull final ClassLoader aClassLoader,
                                                 @Nullable final String sClassName,
                                                 @Nullable final Class <? extends DATATYPE> aDesiredType); @Nullable static DATATYPE newInstance(@Nullable final String sClassName, @Nullable final Class <? extends DATATYPE> aDesiredType); @Nullable static DATATYPE newInstance(@Nullable final String sClassName,
                                                 @Nullable final Class <? extends DATATYPE> aDesiredType,
                                                 @Nullable final ClassLoader aClassLoaderToUse);  }### Answer:
@Test public void testSafeForName () { assertSame (GenericReflectionTest.class, GenericReflection.<GenericReflectionTest> getClassFromNameSafe (GenericReflectionTest.class.getName ())); assertNull (GenericReflection.getClassFromNameSafe ("There ain't no such class")); }