Can I get a class's name as a compile-time constant without hardcoding it in a string literal?
问题 I am working on an annotation processor. This code compiles: package sand; import java.util.Set; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; import javax.lang.model.element.TypeElement; @SupportedAnnotationTypes("sand.Foo") public class FooProcessor extends AbstractProcessor { @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment