Skip to content

Files

Latest commit

Oct 6, 2023
825db92 · Oct 6, 2023

History

History
28 lines (21 loc) · 806 Bytes

legacyannotation.adoc

File metadata and controls

28 lines (21 loc) · 806 Bytes

Legacy Annotation

Having a target method with argument is automatically registered with a matching argument name.

link:../../../../../src/test/java/org/springframework/shell/docs/OptionSnippets.java[role=include]

@ShellOption annotation can be used to define an option name if you don’t want it to be same as argument name.

link:../../../../../src/test/java/org/springframework/shell/docs/OptionSnippets.java[role=include]

If option name is defined without prefix, either - or --, it is discovered from ShellMethod#prefix.

link:../../../../../src/test/java/org/springframework/shell/docs/OptionSnippets.java[role=include]