package scenelib.annotations.field;

/**
 * A {@link ClassTokenAFT} is the type of an annotation field that holds a
 * class token (something like <code>{@link String}.class</code>).
 * Even if the field type was originally some parameterization
 * <code>{@link Class}&lt;...&gt;</code>, the annotation scene library
 * represents it as a plain {@link ClassTokenAFT}.  Use the singleton
 * {@link #ctaft}.
 */
public final class ClassTokenAFT extends ScalarAFT {

    // On 2006.07.07 we decided against parameterizations because
    // class files that use annotations don't contain them.

    // The type arguments, if any, of the field type
    // Could be "" or "<HashMap>" (stupid) or "<? extends PrettyPrinter>", etc.,
    // but not null.
    /* public final String parameterization; */

    private ClassTokenAFT() {}

    /**
     * The singleton {@link ClassTokenAFT}.
     */
    public static final ClassTokenAFT ctaft = new ClassTokenAFT();

    // public ClassTokenAFT(/* String parameterization */) {
    //    /* this.parameterization = parameterization; */
    // }

    @Override
    public boolean isValidValue(Object o) {
        return o instanceof java.lang.Class;
    }

    @Override
    public String toString() {
        return "Class"/* + parameterization */;
    }

    @Override
    public String format(Object o) {
        return ((java.lang.Class<?>)o).getName() + ".class";
    }


    @Override
    public <R, T> R accept(AFTVisitor<R, T> v, T arg) {
        return v.visitClassTokenAFT(this, arg);
    }
}

package scenelib.annotations.field;

/**
 * A {@link ClassTokenAFT} is the type of an annotation field that holds a
 * class token (something like <code>{@link String}.class</code>).
 *
 * Use the singleton {@link #ctaft}.
 *
 * Even if the field type was originally some parameterization
 * <code>{@link Class}&lt;...&gt;</code>, the annotation scene library
 * represents it as a plain {@link ClassTokenAFT}.
 */
public final class ClassTokenAFT extends ScalarAFT {

    private ClassTokenAFT() {}

    /**
     * The singleton {@link ClassTokenAFT}.
     */
    public static final ClassTokenAFT ctaft = new ClassTokenAFT();

    @Override
    public boolean isValidValue(Object o) {
        return o instanceof java.lang.Class;
    }

    @Override
    public String toString() {
        return "Class";
    }

    @Override
    public String format(Object o) {
        return ((java.lang.Class<?>)o).getName() + ".class";
    }


    @Override
    public <R, T> R accept(AFTVisitor<R, T> v, T arg) {
        return v.visitClassTokenAFT(this, arg);
    }
}

Remove commented-out code