public String typeToString(Type t) {
        switch (t.tag) {
        case ARRAY:
            return typeToString(env.jctypes.elemtype(t)) + "[]";
        case CLASS:
            Type.ClassType c = (Type.ClassType) t;
            return DeclaredTypeImpl.toString(env, c);
        case WILDCARD:
            Type.WildcardType a = (Type.WildcardType) t;
            return WildcardTypeImpl.toString(env, a);
        default:
            return t.tsym.toString();
        }
    }