Skip to content

Command: Make it possible to use Initializable interface instead of initializer plugin annotation #413

@frauzufall

Description

@frauzufall

Hi all,

I sometimes use this annotation to initialize e.g. parameters:

@Plugin(type = Command.class, initializer = "init")
public class MyCommand implements Command {

	private void init() {
                ...
	}

.. but I don't like it too much because it's matching a String with a method name and the compiler won't tell me if there's a mismatch.

Would it be a good idea to try to make this do the same:

@Plugin(type = Command.class)
public class MyCommand implements Command, Initializable {

	@Override
	public void initialize() {
                ...
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions