Package cloud.commandframework.arguments
Class StandardCommandSyntaxFormatter.FormattingInstance
java.lang.Object
cloud.commandframework.arguments.StandardCommandSyntaxFormatter.FormattingInstance
- Enclosing class:
- StandardCommandSyntaxFormatter<C>
@API(status=STABLE)
public static class StandardCommandSyntaxFormatter.FormattingInstance
extends Object
Instance that is used when building command syntax
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Append a blank spacevoid
appendCompound
(@NonNull CompoundArgument<?, ?, ?> argument) Append a compound argument to the syntax stringvoid
appendFlag
(@NonNull FlagArgument<?> flagArgument) Append a flag argumentvoid
appendLiteral
(@NonNull StaticArgument<?> literal) Append a literal to the syntax stringvoid
appendName
(@NonNull String name) Append an argument namevoid
appendOptional
(@NonNull CommandArgument<?, ?> argument) Append an optional argumentvoid
Append the pipe (|) charactervoid
appendRequired
(@NonNull CommandArgument<?, ?> argument) Append a required argument@NonNull String
Get the optional argument prefix@NonNull String
Get the optional argument suffix@NonNull String
Get the required argument prefix@NonNull String
Get the required argument suffixfinal @NonNull String
toString()
-
Constructor Details
-
FormattingInstance
protected FormattingInstance()Create a new formatting instance
-
-
Method Details
-
toString
-
appendLiteral
Append a literal to the syntax string- Parameters:
literal
- Literal to append
-
appendCompound
Append a compound argument to the syntax string- Parameters:
argument
- Compound argument to append
-
appendFlag
Append a flag argument- Parameters:
flagArgument
- Flag argument
-
appendRequired
Append a required argument- Parameters:
argument
- Required argument
-
appendOptional
Append an optional argument- Parameters:
argument
- Optional argument
-
appendPipe
public void appendPipe()Append the pipe (|) character -
appendName
Append an argument name- Parameters:
name
- Name to append
-
getRequiredPrefix
Get the required argument prefix- Returns:
- Required argument prefix
-
getRequiredSuffix
Get the required argument suffix- Returns:
- Required argument suffix
-
getOptionalPrefix
Get the optional argument prefix- Returns:
- Optional argument prefix
-
getOptionalSuffix
Get the optional argument suffix- Returns:
- Optional argument suffix
-
appendBlankSpace
public void appendBlankSpace()Append a blank space
-