MatteoJoliveau / PlugFace

Next generation Java general purpose plugin framework
https://plugface.matteojoliveau.com
MIT License
42 stars 11 forks source link

[Core] Plugin can be defined through annotations? #6

Closed MatteoJoliveau closed 6 years ago

MatteoJoliveau commented 7 years ago

To be more flexible, a plugin could be written by annotating its main class, for example in the following way:



@Plugin("test_plugin")
public class TestPlugin {

    @Start
    public void aMethodThatStartsThePlugin() {
        //stuff
    }

    @Stop
    public void aMethodThatStopsThePlugin() {
        //stuff
    }

}
MatteoJoliveau commented 6 years ago

Done, removed any functionality outside of loading, delegating actual plugin logic to whatever the user may want since she's now able to ask for plugins by their interface/supertype. No need to have start/stop/execute logic anymore