Example usage for com.google.common.collect ComputationException getMessage

List of usage examples for com.google.common.collect ComputationException getMessage

Introduction

In this page you can find the example usage for com.google.common.collect ComputationException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:de.cosmocode.commons.reflect.Reflection.java

/**
 * Returns the Class object associated with the class or interface with the given string name.
 * This method does, in contrast to {@link Class#forName(String)}, cache the results.
 * /* ww  w.  java  2  s  .  c  om*/
 * @since 1.6
 * @param name the class name
 * @return the loaded class
 * @throws ClassNotFoundException if the class does not exist
 */
public static Class<?> forName(String name) throws ClassNotFoundException {
    try {
        return CACHE.get(name);
    } catch (ComputationException e) {
        throw new ClassNotFoundException(e.getMessage(), e);
    }
}