Skip to content

Inherited annotation for commands? #660

@devinrsmith

Description

@devinrsmith

I've got a couple commands that share a lot of the same structure, but differ in defaults only. I'd like to be able to specify an abstract command, with specific implementations inhering the abstract classes Command annotation. I think this can be accomplished by adding java.lang.annotation.Inherited to Command.

For example:

@Command(name = "mycommand")
abstract class MyCommand {
  abstract String getContext();
}

class MyCommandFoo extends MyCommand {
  String getContext() { return "foo"; }
}

class MyCommandBar extends MyCommand {
  String getContext() { return "bar"; }
}

Would the Inherited Command annotation be possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions