package fi.evident.apina.java.model.type;

import static java.util.Objects.requireNonNull;

/**
 * Represents a raw Java type, like {@link Class}.
 */
public final class JavaBasicType extends JavaType {

    public final String name;

    public JavaBasicType(String name) {
        this.name = requireNonNull(name);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JavaBasicType that = (JavaBasicType) o;

        return name.equals(that.name);
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }

    @Override
    public String toString() {
        return name;
    }

    public JavaBasicType toBasicType() {
        return this;
    }

    @Override
    public boolean isVoid() {
        return name.equals("void");
    }
}

@@ -309,32 +309,129 @@
 l(name);%0A    %7D%0A%0A
+    public JavaBasicType(Class%3C?%3E cl) %7B%0A        this.name = requireNonNull(cl.getName());%0A    %7D%0A%0A
     @Override%0A  

Add convenience constructor for JavaBasicType