Package org.incendo.cloud.annotations
Interface BuilderDecorator<C>
- Type Parameters:
C- the command sender type
Decorators that get to modify a command builder that is used to construct the command for annotated command methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull BuilderDecorator<C> applicable(@NonNull Command.Builder.Applicable<C> applicable) Returns aBuilderDecoratorapplies the givenapplicableto the command builders.decorate(@NonNull Command.Builder<C> builder) Decorates the givenbuilderand returns the result.static <C> @NonNull BuilderDecorator<C> defaultDescription(@NonNull CommandDescription description) Returns aBuilderDecoratorthat sets the defaultdescriptionof a command.static <C> @NonNull BuilderDecorator<C> defaultPermission(@NonNull Permission permission) Returns aBuilderDecoratorthat sets the defaultpermissionof a command.
-
Method Details
-
defaultDescription
Returns aBuilderDecoratorthat sets the defaultdescriptionof a command.- Type Parameters:
C- the command sender type- Parameters:
description- the description- Returns:
- the decorator
-
defaultPermission
Returns aBuilderDecoratorthat sets the defaultpermissionof a command.- Type Parameters:
C- the command sender type- Parameters:
permission- the permission- Returns:
- the decorator
-
applicable
static <C> @NonNull BuilderDecorator<C> applicable(@NonNull Command.Builder.Applicable<C> applicable) Returns aBuilderDecoratorapplies the givenapplicableto the command builders.- Type Parameters:
C- the command sender type- Parameters:
applicable- the applicable to apply- Returns:
- the decorator
-
decorate
Decorates the givenbuilderand returns the result.- Parameters:
builder- the builder to decorate- Returns:
- the result
-