3 ms·
> reflection involving class names that aren't effectively constant at compile-time Can you give an example?
by calcifer 8y ago
> reflection involving class names that aren't effectively constant at compile-time
Can you give an example?
- xienze 8y agoSure, just about any project that has the concept of plugins. At runtime the code looks for plugin instances by searching for, e.g., META-INF/services/<interface_name> on the classpath. Inside that file (or files) you have implementation class names, which are collected and instantiated.