Closed
Description
@Command
annotation is a replacement for @ShellComponent
and @ShellMethod
.
@ShellComponent
was used as a @Component
to easily add class container into context as a bean and then methods in it became possible targets as invocation.
@ShellMethod
was used to target methods in @ShellComponent
bean as candidates as shell commands.
Plan is to do a modern update how @Command
overall would work as we don't need separate annotations if we do a bit more spring kung fu for scanning things from a classpath.
@Command
Can be defined on both class and method- Annotated on a class level would introduce it to be a candidate for command container(bean instance as we need only one).
- Annotated on a method level would target that particular method as a
CommandRegistration
. - Annotation on a class level would allow defining some common parameters which has been a requested feature so that there is a less duplication on an actual methods.
Possible field ideas:
public @interface Command {
String[] command() default {};
String[] alias() default {};
String group() default "";
String description() default "";
boolean hidden() default false;
InteractionMode[] interactionMode() default {};
}
Metadata
Metadata
Assignees
Labels
No labels