Greetings,
I'd like to inject a plugin into a private field of another plugin. Source code seems supposed to allow it according to following lines in init method of InjectHandler:
// Try to get inject annotation. New: also turn on extended accessibility, so
// elements don't have to be public anymore.
field.setAccessible(true);
The only problem with those lines are the fact that "field" is part of "public only" collection of class fields:
final Field[] fields = plugin.getClass().getFields();
...
// Process every field
for (final Field field : fields) {
The fix would be to change getFields() to getDeclaredFields()
Am I right on it and can it be done?
Thanks,
Anton