All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.hts.springwebdoclet.ReflectionUtils Maven / Gradle / Ivy

Go to download

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;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy