package yokohama.unit.ast;

import lombok.EqualsAndHashCode;
import lombok.SneakyThrows;
import lombok.Value;
import yokohama.unit.util.ClassResolver;

@Value
@EqualsAndHashCode(exclude={"span"})
public class ClassType implements NonArrayType {
    private String name;
    private Span span;

    @SneakyThrows(ClassNotFoundException.class)
    public String getCanonicalName(ClassResolver classResolver) {
        return classResolver.lookup(name).getCanonicalName();
    }

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

@@ -61,37 +61,8 @@
 e;%0D%0A
-import lombok.SneakyThrows;%0D%0A
 impo
@@ -75,24 +75,24 @@
 bok.Value;%0D%0A
+
 import yokoh
@@ -275,57 +275,8 @@
 %0D%0A%0D%0A
-    @SneakyThrows(ClassNotFoundException.class)%0D%0A
     
@@ -334,24 +334,43 @@
 esolver) %7B%0D%0A
+        try %7B%0D%0A    
         retu
@@ -416,24 +416,143 @@
 calName();%0D%0A
+        %7D catch (ClassNotFoundException e) %7B%0D%0A            throw new AstException(e.getMessage(), span, e);%0D%0A        %7D%0D%0A
     %7D%0D%0A%0D%0A   

Change ClassType.getCanonicalName so that it throws AstException