Package org.incendo.cloud.annotations
Class SyntaxFragment
java.lang.Object
org.incendo.cloud.annotations.SyntaxFragment
Represents the fragment of the syntax making up a command.
-
Constructor Summary
ConstructorsConstructorDescriptionSyntaxFragment(@NonNull String major, @NonNull List<@NonNull String> minor, @NonNull ArgumentMode argumentMode) Creates a new syntax fragment -
Method Summary
-
Constructor Details
-
SyntaxFragment
public SyntaxFragment(@NonNull String major, @NonNull List<@NonNull String> minor, @NonNull ArgumentMode argumentMode) Creates a new syntax fragment- Parameters:
major- the major portion of the fragmentminor- the minor portions of the fragmentargumentMode- the argument mode of the fragment
-
-
Method Details
-
major
Returns the major portion of the fragment.This is likely the name of an argument, or a string literal.
- Returns:
- the major part of the fragment
-
minor
Returns the minor part of the fragment.This is likely a list of aliases.
- Returns:
- the minor part of the fragment.
-
argumentMode
Returns the argument mode.- Returns:
- the argument mode
-