
ru.hts.springwebdoclet.ReflectionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-web-doclet Show documentation
Show all versions of spring-web-doclet Show documentation
SpringWebDoclet is an extension to Javadoc utility (Doclet) which generates
web API documentation for backends based on Spring Web MVC framework.
The newest version!
package ru.hts.springwebdoclet;
import org.apache.commons.lang3.ClassUtils;
/** @author Ivan Sungurov */
public class ReflectionUtils {
public static Class getRequiredClass(String className) {
try {
return ClassUtils.getClass(className);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
public static Class getOptionalClass(String className) {
try {
return ClassUtils.getClass(className);
} catch (ClassNotFoundException e) {
return null;
} catch (NoClassDefFoundError e) {
return null;
}
}
}