class ClassUtils {

    static Class<?> forName(String name) {
        return Stream.of(
                tryResolveTypeFor(name),
                tryResolvePrimitiveTypeFor(name))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException(
                        String.format("Could not resolve type for name: %s", name)));

    }

    private  ClassUtils();

}