package yokohama.unit.ast_junit;

import java.util.Optional;
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 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);
    }
}

@@ -332,32 +332,141 @@
 , 0);%0D%0A    %7D%0D%0A%0D%0A
+    public Class%3C?%3E toClass() throws ClassNotFoundException %7B%0D%0A        return Class.forName(name);%0D%0A    %7D%0D%0A%0D%0A
     public stati

Add toClass method