public final class InputArgument
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InputArgument.Status |
| Constructor and Description |
|---|
InputArgument(BladeParameter parameter) |
InputArgument(@NotNull BladeParameter parameter,
@Nullable java.lang.String value,
InputArgument.Status status) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotations(@NotNull java.util.List<java.lang.annotation.Annotation> annotations) |
<T extends java.lang.annotation.Annotation> |
annotation(@NotNull java.lang.Class<T> annotationClass)
Gets a
Forwarded from the argument. |
<T extends java.lang.annotation.Annotation> |
annotationList(@NotNull java.lang.Class<T> annotationClass)
Gets all
Forwardeds of a specific type from the argument. |
java.util.List<java.lang.String> |
data() |
boolean |
isOptionalAcceptingNull()
Checks if the argument is optional and accepts null values.
|
boolean |
isOptionalWithType(Opt.Type type)
Checks if the argument is optional with a specific type.
|
@Nullable Opt |
optional()
Gets the
Opt annotation of the argument, if present. |
BladeParameter |
parameter() |
@Nullable Range |
range()
Gets the
Range annotation of the argument, if present. |
@NotNull java.lang.String |
requireValue()
Gets the value of the argument, throwing an exception if it is not present.
|
InputArgument.Status |
status() |
InputArgument |
status(InputArgument.Status status) |
@Nullable java.lang.String |
value() |
InputArgument |
value(@Nullable java.lang.String value) |
public InputArgument(@NotNull
@NotNull BladeParameter parameter,
@Nullable
@Nullable java.lang.String value,
@NotNull
InputArgument.Status status)
public InputArgument(BladeParameter parameter)
@NotNull public @NotNull java.lang.String requireValue()
java.lang.IllegalStateException - if the value is not present@Nullable public @Nullable Opt optional()
Opt annotation of the argument, if present.public boolean isOptionalWithType(@NotNull
Opt.Type type)
type - the type to checkpublic boolean isOptionalAcceptingNull()
@Nullable public @Nullable Range range()
Range annotation of the argument, if present.@Nullable
public <T extends java.lang.annotation.Annotation> T annotation(@NotNull
@NotNull java.lang.Class<T> annotationClass)
Forwarded from the argument.T - the type of the annotationannotationClass - the class of the annotation to get@NotNull
public <T extends java.lang.annotation.Annotation> @NotNull java.util.List<T> annotationList(@NotNull
@NotNull java.lang.Class<T> annotationClass)
Forwardeds of a specific type from the argument.T - the type of the annotationannotationClass - the class of the annotation to get@ApiStatus.Internal
public void addAnnotations(@NotNull
@NotNull java.util.List<java.lang.annotation.Annotation> annotations)
public BladeParameter parameter()
@Nullable public @Nullable java.lang.String value()
public InputArgument.Status status()
public java.util.List<java.lang.String> data()
@ApiStatus.Internal public InputArgument value(@Nullable @Nullable java.lang.String value)
this.@ApiStatus.Internal public InputArgument status(InputArgument.Status status)
this.