Hello!
There are several small projects. To one of them screwed JMX. Happened. But now you need to make a separate module, where JMX will be implemented using reflection. The idea is that in the class that needs to be monitored, annotations are added to the necessary methods / fields (for example: @JMXTest) and all the necessary interfaces and classes for the work of JMX are already created.
The following point is not very clear to me: how to create a class with the help of reflection with the necessary set of fields and methods? As I understand it, reflection allows you to create instances of classes, but they must be described in advance.
Thanks in advance for any help and please do not throw rotten vegetables))
PS: The logic itself implemented in the classes does not seem to play a role, so I don’t attach the code.