public class BladeParameter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
alwaysQuoted |
protected java.util.List<java.lang.String> |
data |
protected @Nullable java.lang.reflect.AnnotatedElement |
element |
protected java.lang.String |
name |
protected java.lang.Class<?> |
type |
| Constructor and Description |
|---|
BladeParameter(Blade blade,
java.lang.String name,
java.lang.Class<?> type,
java.util.List<java.lang.String> data,
@Nullable java.lang.reflect.AnnotatedElement element) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.List<java.lang.annotation.Annotation> |
annotations()
Returns all annotations present on this parameter.
|
Blade |
blade() |
@Nullable ArgumentProvider<?> |
customCompleter()
Returns the custom
ArgumentProvider used for tab-completing this parameter, if any. |
@Nullable ArgumentProvider<?> |
customParser()
Returns the custom
ArgumentProvider used for parsing this parameter, if any. |
java.util.List<java.lang.String> |
data() |
@Nullable java.lang.reflect.AnnotatedElement |
element() |
boolean |
hasCustomCompleter()
Returns whether this parameter has a custom completer.
|
boolean |
hasCustomParser()
Returns whether this parameter has a custom parser.
|
boolean |
hasRange()
Returns whether this parameter has a range annotation.
|
boolean |
isGreedy()
Returns whether this parameter has a greedy annotation.
|
boolean |
isOptional()
Returns whether this parameter has an optional annotation.
|
boolean |
isQuoted()
Returns whether this parameter has a quoted annotation.
|
java.lang.String |
name() |
@Nullable Opt |
optional()
Returns the
Opt annotation of this parameter, if present. |
@Nullable Provider |
provider()
Returns the
Provider annotation of this parameter, if present. |
@Nullable Range |
range()
Returns the
Range annotation of this parameter, if present. |
java.lang.Class<?> |
type() |
protected final java.lang.String name
protected final java.lang.Class<?> type
protected final java.util.List<java.lang.String> data
@Nullable protected final @Nullable java.lang.reflect.AnnotatedElement element
protected boolean alwaysQuoted
public BladeParameter(Blade blade, java.lang.String name, java.lang.Class<?> type, java.util.List<java.lang.String> data, @Nullable @Nullable java.lang.reflect.AnnotatedElement element)
@NotNull public @NotNull java.util.List<java.lang.annotation.Annotation> annotations()
@Nullable public @Nullable Opt optional()
Opt annotation of this parameter, if present.public boolean isOptional()
@Nullable public @Nullable Range range()
Range annotation of this parameter, if present.public boolean hasRange()
public boolean isQuoted()
@Nullable public @Nullable Provider provider()
Provider annotation of this parameter, if present.public boolean hasCustomParser()
@Nullable public @Nullable ArgumentProvider<?> customParser()
ArgumentProvider used for parsing this parameter, if any.public boolean hasCustomCompleter()
@Nullable public @Nullable ArgumentProvider<?> customCompleter()
ArgumentProvider used for tab-completing this parameter, if any.public boolean isGreedy()
public Blade blade()
public java.lang.String name()
public java.lang.Class<?> type()
public java.util.List<java.lang.String> data()
@Nullable public @Nullable java.lang.reflect.AnnotatedElement element()