Re: reflection on this forum:
- Java Reflections cheatsheet for processing
- [SOLVED] Instantiating a particular class constructor using reflection
- https://forum.processing.org/two/discussion/27164/string-to-class-classnotfoundexception#Item_3
@GoToLoop has spent quite a bit of time on reflection in Processing.
The Processing API uses a related technique, a string as a method name (rather than a class name) in, for example, selectFolder – internally it calls selectMethod, which uses .getMethod()
to turn the text String callbackMethod
argument given to selectFolder into the corresponding Processing function (Method selectMethod
) for the callback.