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

com.github.atdixon.vroom.coercion.Util Maven / Gradle / Ivy

Go to download

Work immutably, robustly and in a knowledge-oriented way with Entity maps in Java.

There is a newer version: 0.3.13
Show newest version
package com.github.atdixon.vroom.coercion;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public final class Util {

    private Util() {}

    static Class rawTypeOf(Type type) {
        if (type instanceof Class) {
            return (Class) type;
        } else if (type instanceof ParameterizedType) {
            return (Class) ((ParameterizedType) type).getRawType();
        } else {
            throw new IllegalArgumentException();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy