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