package yokohama.unit.ast_junit;

import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;
import lombok.Value;

@Value
public class ClassType implements NonArrayType {
    private String name;
    private Span span;

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

    public Type toType() {
        return new Type(this, 0);
    }

    public Class<?> toClass() {
        try {
            return Class.forName(name);
        } catch (ClassNotFoundException ex) {
            throw new RuntimeException(ex);
        }
    }

    public static ClassType of(yokohama.unit.ast.ClassType classType) {
        return new ClassType(
                classType.getName(),
                new Span(
                        Optional.empty(),
                        classType.getSpan().getStart(),
                        classType.getSpan().getEnd()));

    }

    @Override
    public <T> T accept(NonArrayTypeVisitor<T> visitor) {
        return visitor.visitClassType(this);
    }
}

@@ -61,75 +61,8 @@
 l;%0D%0A
-import java.util.logging.Level;%0D%0Aimport java.util.logging.Logger;%0D%0A
 impo

remove unused imports