Class FlagArgument<C>
- java.lang.Object
-
- cloud.commandframework.arguments.CommandArgument<C,java.lang.Object>
-
- cloud.commandframework.arguments.compound.FlagArgument<C>
-
- Type Parameters:
C
- Command sender type
- All Implemented Interfaces:
java.lang.Comparable<CommandArgument<?,?>>
public final class FlagArgument<C> extends CommandArgument<C,java.lang.Object>
Container for flag parsing logic. This should not be be used directly. Internally, a flag argument is a special case of aCompoundArgument
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlagArgument.FailureReason
Reasons for which flag parsing may failstatic class
FlagArgument.FlagArgumentParser<C>
static class
FlagArgument.FlagParseException
Flag parse exception-
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FLAG_META
Meta data for the last argument that was suggestedstatic java.lang.Object
FLAG_PARSE_RESULT_OBJECT
Dummy object that indicates that flags were parsed successfully
-
Constructor Summary
Constructors Constructor Description FlagArgument(java.util.Collection<CommandFlag<?>> flags)
Construct a new flag argument
-
Method Summary
Modifier and Type Method Description @NonNull java.util.Collection<@NonNull CommandFlag<?>>
getFlags()
Get the flags registered in the argument-
Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultValue, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
-
-
-
Field Detail
-
FLAG_PARSE_RESULT_OBJECT
public static final java.lang.Object FLAG_PARSE_RESULT_OBJECT
Dummy object that indicates that flags were parsed successfully
-
FLAG_META
public static final java.lang.String FLAG_META
Meta data for the last argument that was suggested- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlagArgument
public FlagArgument(java.util.Collection<CommandFlag<?>> flags)
Construct a new flag argument- Parameters:
flags
- Flags
-
-
Method Detail
-
getFlags
public @NonNull java.util.Collection<@NonNull CommandFlag<?>> getFlags()
Get the flags registered in the argument- Returns:
- Unmodifiable view of flags
-
-