com.neeve.cli.annotations
Annotation Type Command


@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface Command

Marks a method or an object as an executable command.


Optional Element Summary
 String[] aliases
          Returns the aliases used to invoke this command.
 String description
          Returns a brief description for the command.
 boolean disabled
          True if the command should be disabled.
 String displayName
          Returns a display name for the command.
 String[] group
          The group to which a command belongs.
 boolean hidden
          True if the command should be hidden from the usage.
 String name
          Returns the name of the command.
 boolean parseOptions
          Can be set to false to skip options (-?)
 

description

public abstract String description
Returns a brief description for the command.

Returns:
The name of the command.
Default:
""

name

public abstract String name
Returns the name of the command.

If this parameter is omitted on an annotated Method then the name will default to the method name.

If this parameter is omitted on an annotated Class, then the name will be the name of the class.

Returns:
The name of the command.
Default:
""

displayName

public abstract String displayName
Returns a display name for the command.

This value can be used by user interfaces in place of the actual command name. When this value is omitted, the name() should be used.

Returns:
A short, friendly display name for the command.
Default:
""

aliases

public abstract String[] aliases
Returns the aliases used to invoke this command.

Returns:
Returns the aliases used to invoke this command.
Default:
{}

hidden

public abstract boolean hidden
True if the command should be hidden from the usage.

Returns:
True if the command should be hidden from the usage.
Default:
false

disabled

public abstract boolean disabled
True if the command should be disabled.

Returns:
True if the command should be disabled
Default:
false

parseOptions

public abstract boolean parseOptions
Can be set to false to skip options (-?) parsing. This is useful if command arguments themselves may start with a '-' character.

Returns:
True if options should be parsed.
Default:
true

group

public abstract String[] group
The group to which a command belongs. Used by tools like Lumino to categorize commands.

Returns:
The group hierarchy this command belongs to.
Default:
{}


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.