Is it possible to open a .txt/.java file containing a class, and using reflection on it?
问题 What I mean by this, is opening a file with a Java code in it as a class, not as a file. So basically I want to: -> Open a pure text file in a self written Java application (.txt/.log/.java) -> Recognize class(es) in the file, for example: public class TestExample { private String example; public String getExample() { return example; } } I will open this in a hand-written program. Instead of recognizing the text in the file as a String or as pure text, it will find the class TestExample in it