aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/lombok/ConfigurationKeys.java74
-rw-r--r--src/core/lombok/core/configuration/ConfigurationApp.java9
-rw-r--r--src/core/lombok/core/configuration/ConfigurationDataType.java28
3 files changed, 50 insertions, 61 deletions
diff --git a/src/core/lombok/ConfigurationKeys.java b/src/core/lombok/ConfigurationKeys.java
index 3e8de5a9..54d8f941 100644
--- a/src/core/lombok/ConfigurationKeys.java
+++ b/src/core/lombok/ConfigurationKeys.java
@@ -41,28 +41,28 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @AllArgsConstructor}, {@code @RequiredArgsConstructor}, or {@code @NoArgsConstructor} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> ANY_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.AnyConstructor.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> ANY_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.AnyConstructor.flagUsage", "Emit a warning or error if any of the XxxArgsConstructor annotations are used.") {};
/**
* lombok configuration: {@code lombok.AllArgsConstructor.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @AllArgsConstructor} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> ALL_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.AllArgsConstructor.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> ALL_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.AllArgsConstructor.flagUsage", "Emit a warning or error if @AllArgsConstructor is used.") {};
/**
* lombok configuration: {@code lombok.NoArgsConstructor.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @NoArgsConstructor} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> NO_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.NoArgsConstructor.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> NO_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.NoArgsConstructor.flagUsage", "Emit a warning or error if @NoArgsConstructor is used.") {};
/**
* lombok configuration: {@code lombok.RequiredArgsConstructor.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @RequiredArgsConstructor} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> REQUIRED_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.RequiredArgsConstructor.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> REQUIRED_ARGS_CONSTRUCTOR_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.RequiredArgsConstructor.flagUsage", "Emit a warning or error if @RequiredArgsConstructor is used.") {};
// ##### Beanies #####
@@ -73,7 +73,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Data} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> DATA_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Data.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> DATA_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Data.flagUsage", "Emit a warning or error if @Data is used.") {};
// ----- Value -----
@@ -82,7 +82,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Value} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> VALUE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Value.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> VALUE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Value.flagUsage", "Emit a warning or error if @Value is used.") {};
// ----- Getter -----
@@ -91,7 +91,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Getter} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> GETTER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Getter.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> GETTER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Getter.flagUsage", "Emit a warning or error if @Getter is used.") {};
// ----- Setter -----
@@ -100,7 +100,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Setter} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> SETTER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Setter.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> SETTER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Setter.flagUsage", "Emit a warning or error if @Setter is used.") {};
// ----- EqualsAndHashCode -----
@@ -109,7 +109,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @EqualsAndHashCode} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> EQUALS_AND_HASH_CODE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.EqualsAndHashCode.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> EQUALS_AND_HASH_CODE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.EqualsAndHashCode.flagUsage", "Emit a warning or error if @EqualsAndHashCode is used.") {};
// ----- ToString -----
/**
@@ -117,7 +117,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @ToString} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> TO_STRING_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.ToString.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> TO_STRING_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.ToString.flagUsage", "Emit a warning or error if @ToString is used.") {};
// ##### Standalones #####
@@ -128,7 +128,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Cleanup} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> CLEANUP_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Cleanup.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> CLEANUP_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Cleanup.flagUsage", "Emit a warning or error if @Cleanup is used.") {};
// ----- Delegate -----
@@ -137,7 +137,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Delegate} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> DELEGATE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Delegate.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> DELEGATE_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Delegate.flagUsage", "Emit a warning or error if @Delegate is used.") {};
// ----- NonNull -----
@@ -148,7 +148,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @NonNull} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> NON_NULL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.NonNull.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> NON_NULL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.NonNull.flagUsage", "Emit a warning or error if @NonNull is used.") {};
// ----- SneakyThrows -----
@@ -157,7 +157,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @SneakyThrows} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> SNEAKY_THROWS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.SneakyThrows.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> SNEAKY_THROWS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.SneakyThrows.flagUsage", "Emit a warning or error if @SneakyThrows is used.") {};
// ----- Synchronized -----
@@ -166,7 +166,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Synchronized} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> SYNCHRONIZED_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Synchronized.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> SYNCHRONIZED_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Synchronized.flagUsage", "Emit a warning or error if @Synchronized is used.") {};
// ----- val -----
@@ -175,7 +175,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code val} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> VAL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.val.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> VAL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.val.flagUsage", "Emit a warning or error if 'val' is used.") {};
// ##### Extern #####
@@ -185,56 +185,56 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of any of the log annotations in {@code lombok.extern}{@code @Slf4j} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_ANY_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_ANY_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.flagUsage", "Emit a warning or error if any of the log annotations is used.") {};
/**
* lombok configuration: {@code lombok.log.apacheCommons.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @CommonsLog} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_COMMONS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.apacheCommons.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_COMMONS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.apacheCommons.flagUsage", "Emit a warning or error if @CommonsLog is used.") {};
/**
* lombok configuration: {@code lombok.log.javaUtilLogging.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @Log} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_JUL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.javaUtilLogging.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_JUL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.javaUtilLogging.flagUsage", "Emit a warning or error if @Log is used.") {};
/**
* lombok configuration: {@code lombok.log.log4j.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @Log4j} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_LOG4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.log4j.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_LOG4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.log4j.flagUsage", "Emit a warning or error if @Log4j is used.") {};
/**
* lombok configuration: {@code lombok.log.log4j2.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @Log4j2} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_LOG4J2_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.log4j2.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_LOG4J2_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.log4j2.flagUsage", "Emit a warning or error if @Log4j2 is used.") {};
/**
* lombok configuration: {@code lombok.log.slf4j.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @Slf4j} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_SLF4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.slf4j.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_SLF4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.slf4j.flagUsage", "Emit a warning or error if @Slf4j is used.") {};
/**
* lombok configuration: {@code lombok.log.xslf4j.flagUsage} = {@code WARNING} | {@code ERROR}.
*
* If set, <em>any</em> usage of {@code @XSlf4j} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> LOG_XSLF4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.xslf4j.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> LOG_XSLF4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.xslf4j.flagUsage", "Emit a warning or error if @XSlf4j is used.") {};
/**
* lombok configuration: {@code lombok.log.fieldName} = "aJavaIdentifier".
*
* If set the various log annotations (which make a log field) will use the stated identifier instead of {@code log} as a name.
*/
- public static final ConfigurationKey<String> LOG_ANY_FIELD_NAME = new ConfigurationKey<String>("lombok.log.fieldName") {};
+ public static final ConfigurationKey<String> LOG_ANY_FIELD_NAME = new ConfigurationKey<String>("lombok.log.fieldName", "Use this name for the generated logger fields (default: 'log')") {};
/**
* lombok configuration: {@code lombok.log.fieldIsStatic} = {@code true} | {@code false}.
@@ -243,7 +243,7 @@ public class ConfigurationKeys {
*
* If set to {@code false}, these will be generated as instance fields instead.
*/
- public static final ConfigurationKey<Boolean> LOG_ANY_FIELD_IS_STATIC = new ConfigurationKey<Boolean>("lombok.log.fieldIsStatic") {};
+ public static final ConfigurationKey<Boolean> LOG_ANY_FIELD_IS_STATIC = new ConfigurationKey<Boolean>("lombok.log.fieldIsStatic", "Make the generated logger fields static (default: true).") {};
// ##### Experimental #####
@@ -253,7 +253,7 @@ public class ConfigurationKeys {
* If set, <em>any</em> usage of any experimental features (from package {@code lombok.experimental}) that haven't been
* promoted to a main feature results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> EXPERIMENTAL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.experimental.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> EXPERIMENTAL_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.experimental.flagUsage", "Emit a warning or error if an experimental feature is used.") {};
// ----- Accessors -----
@@ -262,28 +262,28 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Accessors} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> ACCESSORS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Accessors.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> ACCESSORS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Accessors.flagUsage", "Emit a warning or error if @Accessors is used.") {};
/**
* lombok configuration: {@code lombok.Accessors.prefix} += &lt;String: prefix&gt;.
*
* For any class without an {@code @Accessors} that explicitly defines the {@code prefix} option, this list of prefixes is used.
*/
- public static final ConfigurationKey<List<String>> ACCESSORS_PREFIX = new ConfigurationKey<List<String>>("lombok.Accessors.prefix") {};
+ public static final ConfigurationKey<List<String>> ACCESSORS_PREFIX = new ConfigurationKey<List<String>>("lombok.Accessors.prefix", "Specify field prefixes, like 'f' or 'm_', to be stipped when generating getters and setters.") {};
/**
- * lombok configuration: {@code lombok.Accessors.chain} += {@code true} | {@code false}.
+ * lombok configuration: {@code lombok.Accessors.chain} = {@code true} | {@code false}.
*
* For any class without an {@code @Accessors} that explicitly defines the {@code chain} option, this value is used.
*/
- public static final ConfigurationKey<Boolean> ACCESSORS_CHAIN = new ConfigurationKey<Boolean>("lombok.Accessors.chain") {};
+ public static final ConfigurationKey<Boolean> ACCESSORS_CHAIN = new ConfigurationKey<Boolean>("lombok.Accessors.chain", "Generated setters should return 'this' instead if 'void'.") {};
/**
- * lombok configuration: {@code lombok.Accessors.fluent} += {@code true} | {@code false}.
+ * lombok configuration: {@code lombok.Accessors.fluent} = {@code true} | {@code false}.
*
* For any class without an {@code @Accessors} that explicitly defines the {@code fluent} option, this value is used.
*/
- public static final ConfigurationKey<Boolean> ACCESSORS_FLUENT = new ConfigurationKey<Boolean>("lombok.Accessors.fluent") {};
+ public static final ConfigurationKey<Boolean> ACCESSORS_FLUENT = new ConfigurationKey<Boolean>("lombok.Accessors.fluent", "The name for generated getters and setters will only be the field name (no get/set prefix).") {};
// ----- Builder -----
@@ -292,7 +292,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Builder} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> BUILDER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Builder.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> BUILDER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Builder.flagUsage", "Emit a warning or error if @Builder is used.") {};
// ----- ExtensionMethod -----
@@ -301,7 +301,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @ExtensionMethod} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> EXTENSION_METHOD_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.ExtensionMethod.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> EXTENSION_METHOD_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.ExtensionMethod.flagUsage", "Emit a warning or error if @ExtensionMethod is used.") {};
// ----- FieldDefaults -----
@@ -310,7 +310,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @FieldDefaults} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> FIELD_DEFAULTS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.FieldDefaults.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> FIELD_DEFAULTS_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.FieldDefaults.flagUsage", "Emit a warning or error if @FieldDefaults is used.") {};
// ----- Wither -----
@@ -319,7 +319,7 @@ public class ConfigurationKeys {
*
* If set, <em>any</em> usage of {@code @Value} results in a warning / error.
*/
- public static final ConfigurationKey<FlagUsageType> WITHER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Wither.flagUsage") {};
+ public static final ConfigurationKey<FlagUsageType> WITHER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Wither.flagUsage", "Emit a warning or error if @Wither is used.") {};
/**
@@ -329,5 +329,5 @@ public class ConfigurationKeys {
*
* If set to {@code true}, no futher {@code lombok.config} files will be checked.
*/
- public static final ConfigurationKey<Boolean> STOP_BUBBLING = new ConfigurationKey<Boolean>("stop-bubbling", "Tells the configuration system if it should stop looking for other configuration files.") {};
+ public static final ConfigurationKey<Boolean> STOP_BUBBLING = new ConfigurationKey<Boolean>("stop-bubbling", "Tell the configuration system it should stop looking for other configuration files (default: false).") {};
}
diff --git a/src/core/lombok/core/configuration/ConfigurationApp.java b/src/core/lombok/core/configuration/ConfigurationApp.java
index 9dc49662..183bbf6d 100644
--- a/src/core/lombok/core/configuration/ConfigurationApp.java
+++ b/src/core/lombok/core/configuration/ConfigurationApp.java
@@ -122,11 +122,12 @@ public class ConfigurationApp extends LombokApp {
String description = key.getDescription();
boolean hasDescription = description != null && !description.isEmpty();
if (!verbose) {
+ out.println(keyName);
if (hasDescription) {
- out.printf("%s: %s\n", keyName, description);
- } else {
- out.printf("%s\n", keyName);
+ out.print(" ");
+ out.println(description);
}
+ out.println();
continue;
}
out.printf("##\n## Key : %s\n## Type: %s\n", keyName, type);
@@ -144,7 +145,7 @@ public class ConfigurationApp extends LombokApp {
out.println("#\n");
}
if (!verbose) {
- out.println("\nUse --verbose for more information.");
+ out.println("Use --verbose for more information.");
}
}
diff --git a/src/core/lombok/core/configuration/ConfigurationDataType.java b/src/core/lombok/core/configuration/ConfigurationDataType.java
index aeb14316..ca0302ff 100644
--- a/src/core/lombok/core/configuration/ConfigurationDataType.java
+++ b/src/core/lombok/core/configuration/ConfigurationDataType.java
@@ -37,7 +37,7 @@ public final class ConfigurationDataType {
return value;
}
@Override public String description() {
- return "String";
+ return "string";
}
@Override public String exampleValue() {
return "<text>";
@@ -48,7 +48,7 @@ public final class ConfigurationDataType {
return Integer.parseInt(value);
}
@Override public String description() {
- return "Integer";
+ return "int";
}
@Override public String exampleValue() {
return "<int>";
@@ -59,7 +59,7 @@ public final class ConfigurationDataType {
return Long.parseLong(value);
}
@Override public String description() {
- return "Long";
+ return "long";
}
@Override public String exampleValue() {
return "<long>";
@@ -70,7 +70,7 @@ public final class ConfigurationDataType {
return Double.parseDouble(value);
}
@Override public String description() {
- return "Double";
+ return "double";
}
@Override public String exampleValue() {
return "<double>";
@@ -81,7 +81,7 @@ public final class ConfigurationDataType {
return Boolean.parseBoolean(value);
}
@Override public String description() {
- return "Boolean";
+ return "boolean";
}
@Override public String exampleValue() {
return "[false | true]";
@@ -92,7 +92,7 @@ public final class ConfigurationDataType {
return TypeName.valueOf(value);
}
@Override public String description() {
- return "TypeName";
+ return "type-name";
}
@Override public String exampleValue() {
return "<fully.qualified.Type>";
@@ -113,7 +113,7 @@ public final class ConfigurationDataType {
}
}
@Override public String description() {
- return rawType.getName();
+ return "enum (" + rawType.getName() + ")";
}
@Override public String exampleValue() {
return Arrays.toString(rawType.getEnumConstants()).replace(",", " |");
@@ -171,20 +171,8 @@ public final class ConfigurationDataType {
}
@Override
- public int hashCode() {
- return (isList ? 1231 : 1237) + parser.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof ConfigurationDataType)) return false;
- ConfigurationDataType other = (ConfigurationDataType) obj;
- return isList == other.isList && parser.equals(other.parser);
- }
-
- @Override
public String toString() {
- if (isList) return "List<" + parser.description() + ">";
+ if (isList) return "list of " + parser.description();
return parser.description();
}