Package studio.mevera.imperat.command
Enum Class AttachmentMode
- All Implemented Interfaces:
Serializable,Comparable<AttachmentMode>,Constable
Defines the modes of attachment for a subcommand within a
Command.
This enum determines how a subcommand integrates with the usages of a command,
based on the specified attachment mode.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAttaches the subcommand to the default usage of aCommand, which may be empty or contain optional arguments/parameters.Attaches the subcommand to an empty usage of theCommandAttaches the sub command to the mainCommandUsageof aCommandA main usage is a usage that contains required arguments/parameters.Behaves exactly likeMAIN, It's used internally to know when to prefer the global attachment mode over the per subcommand one. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AttachmentModeReturns the enum constant of this class with the specified name.static AttachmentMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMPTY
Attaches the subcommand to an empty usage of theCommand -
DEFAULT
Attaches the subcommand to the default usage of aCommand, which may be empty or contain optional arguments/parameters. -
MAIN
Attaches the sub command to the mainCommandUsageof aCommandA main usage is a usage that contains required arguments/parameters. -
UNSET
Behaves exactly likeMAIN, It's used internally to know when to prefer the global attachment mode over the per subcommand one.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
requiresParameterInheritance
public boolean requiresParameterInheritance()
-