Here you can find the source of forNameOrNull(String className)
public static Class<?> forNameOrNull(String className)
//package com.java2s; //License from project: Apache License public class Main { public static Class<?> forNameOrNull(String className) { try {//from w w w . ja v a2 s.c o m return Class.forName(className); } catch (ClassNotFoundException e) { return null; } } }