I need to read a java project files from outside of that project. So Java Reflection cannot be used. Is there any mechanism or specific API to read a .java files of a project and extract the method signature details into a java code. Maybe a text search API ?
You could still read it by providing the path to class file directory. And then you need to provide the exact package to the class file
File file = new File("Absolute_path\\target\\classes\\");
URL urlList[] = {file.toURL()};
URLClassLoader loader = new URLClassLoader(urlList, Thread.currentThread().getContextClassLoader());
Class c = (Class) Class.forName("com.java.dto.BaseDTO", true, loader);
Thanks JTeam