Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
@Retention(CLASS) @Target({TYPE})
public @interface CommandLine.Command
Marks a command class.
Methods
public abstract String name() default "" | The name the command is invoked by. |
public abstract String[] aliases() default {} | Other names the command answers to as a subcommand. |
public abstract String[] description() default {} | Lines of help text. |
public abstract String[] version() default {} | Lines --version prints. |
public abstract boolean mixinStandardHelpOptions() default false | Adds -h/--help and -V/--version. |
public abstract Class<?>[] subcommands() default {} | Command classes that are subcommands of this one. |
Method details
name
public abstract String name() default ""The name the command is invoked by. Defaults to the class name in
lower case.
aliases
public abstract String[] aliases() default {}Other names the command answers to as a subcommand.
description
public abstract String[] description() default {}Lines of help text.
version
public abstract String[] version() default {}Lines
--version prints.mixinStandardHelpOptions
public abstract boolean mixinStandardHelpOptions() default falseAdds
-h/--help and -V/--version.subcommands
public abstract Class<?>[] subcommands() default {}Command classes that are subcommands of this one.