class TypeAliasResolver {

    public TypeAlias getAliasFor(Type type) {
        TypeAlias alias = typeAliases.getAliasesMappedByType().get(type);
        if (alias == null) {
            String message = String.format("Could not find type alias for given type: %s", type);
            throw new IllegalArgumentException(message);
        }
        return alias;
    }

    public  TypeAliasResolver();

}