I am writing an annotation processor that works in Java. It scans annotated classes and creates a resource file containing class names. These names will be used at runtime to be able to get Class<?> Thanks to Class.forName(String) .
How to get class name (e.g. pgk1.pkg2.Foo $ Bar) from javax.lang.model.element.TypeElement .
Tips: I do not need a simple name (for example, Bar), or a qualified name (for example, pgk1.pkg2.Foo.Bar).
source share