mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Three
This commit is contained in:
parent
a8449de731
commit
aaccfdee44
@ -79,11 +79,11 @@ public class DecreeParameter {
|
||||
}
|
||||
|
||||
public Object getDefaultValue() throws DecreeParsingException, DecreeWhichException {
|
||||
return param.defaultValue().equals(Param.REQUIRED) ? null : getHandler().parse(param.defaultValue());
|
||||
return param.defaultValue().trim().isEmpty() ? null : getHandler().parse(param.defaultValue().trim());
|
||||
}
|
||||
|
||||
public boolean hasDefault() {
|
||||
return !param.defaultValue().equals(Param.REQUIRED);
|
||||
return !param.defaultValue().trim().isEmpty();
|
||||
}
|
||||
|
||||
public String example() {
|
||||
|
@ -28,8 +28,6 @@ import java.lang.annotation.Target;
|
||||
public @interface Param {
|
||||
String DEFAULT_DESCRIPTION = "No Description Provided";
|
||||
|
||||
String REQUIRED = "Required";
|
||||
|
||||
/**
|
||||
* The main name of this command.<br>
|
||||
* Required parameter.<br>
|
||||
@ -49,7 +47,7 @@ public @interface Param {
|
||||
* Which indicates the variable MUST be defined by the person running the command.<br>
|
||||
* If you define this, the variable automatically becomes non-required, but can still be set.
|
||||
*/
|
||||
String defaultValue() default REQUIRED;
|
||||
String defaultValue() default "";
|
||||
|
||||
/**
|
||||
* The aliases of this parameter (instead of just the {@link #name() name} (if specified) or Method Name (name of method))<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user