Closed theborakompanioni closed 1 year ago
I assume the plugin still works and will just report false or duplicate information in the getmanifest response. Would it be desirable to report the correct information and support multiple classes?
I the time I did not think about this, and I guess this could be a very good bug fix! Do you have already some idea on how to fix it?
Currently, and if I am not mistaken, the library only supports a single
Plugin
class on the whole classpath. In some cases it is desirable to have multiple classes extendingCLightningPlugin
, even if only one is actually active (by invokingstart()
).The reasons seems to be that
CLightningPlugin#registerMethod
collects all classes containing any of the annotations (Subscription
,Hook
, etc.) and subsequently tries to invoke it on the currently active plugin object, even if it might not have the method defined itself.I assume the plugin still works and will just report false or duplicate information in the
getmanifest
response. Would it be desirable to report the correct information and support multiple classes?