Multiple classes in an (undefined) ArrayList?

You might look at JavaParser I discovered some years ago but never got round to try it out.

2 Likes

@quark

I made great progress here.

I am working on a Sketch that can analyze itself.

The thing is that for (Class currentUserClass : getClass().getDeclaredClasses()) {

or for (java.lang.reflect.Method currentMethod : getClass().getDeclaredMethods()) {

does work only for the current Sketch itself.

What would be the easiest way to retrieve this from another Sketch?

In my analyzing Sketch I would like to open the folder of another Sketch and have this analyzed.

Thanks.

TBH I don’t know the answer. You are using Java reflection and I suspect that this is only possible if the classes of interest are on the Java classpath.

You might try adding the import statements from the sketch to be analyzed to the analyzing sketch.

1 Like