I want to get information about fields from a Class on which a specific annotation is present by getting the annotation in annotation processor.
I can retrieve fully qualified class name from annotation but can't instantiate it, a ClassNotFoundException
is being thrown, although class is there.
How can I check if class is not in class path or which classpath is included for annotation processor?
try {
Class<?> clazz = Class.forName(((TypeElement) e).getQualifiedName().toString());
} catch (ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}