summaryrefslogtreecommitdiff
path: root/dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java')
-rw-r--r--dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java70
1 files changed, 35 insertions, 35 deletions
diff --git a/dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java b/dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java
index 868884c..7983997 100644
--- a/dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java
+++ b/dicore3/command/src/main/java/io/dico/dicore/command/annotation/CommandAnnotationUtils.java
@@ -1,35 +1,35 @@
-package io.dico.dicore.command.annotation;
-
-public class CommandAnnotationUtils {
-
- /**
- * Get the short description from a {@link Desc} annotation.
- * If {@link Desc#shortVersion()} is given, returns that.
- * Otherwise, returns the first element of {@link Desc#value()}
- * If neither is available, returns null.
- *
- * @param desc the annotation
- * @return the short description
- */
- public static String getShortDescription(Desc desc) {
- String descString;
- if (desc == null) {
- descString = null;
- } else if (!desc.shortVersion().isEmpty()) {
- descString = desc.shortVersion();
- } else if (desc.value().length > 0) {
- descString = desc.value()[0];
- if (desc.value().length > 1) {
- //System.out.println("[Command Warning] Multiline descriptions not supported here. Keep it short for: " + targetIdentifier);
- }
- if (descString != null && descString.isEmpty()) {
- descString = null;
- }
- } else {
- descString = null;
- }
-
- return descString;
- }
-
-}
+package io.dico.dicore.command.annotation;
+
+public class CommandAnnotationUtils {
+
+ /**
+ * Get the short description from a {@link Desc} annotation.
+ * If {@link Desc#shortVersion()} is given, returns that.
+ * Otherwise, returns the first element of {@link Desc#value()}
+ * If neither is available, returns null.
+ *
+ * @param desc the annotation
+ * @return the short description
+ */
+ public static String getShortDescription(Desc desc) {
+ String descString;
+ if (desc == null) {
+ descString = null;
+ } else if (!desc.shortVersion().isEmpty()) {
+ descString = desc.shortVersion();
+ } else if (desc.value().length > 0) {
+ descString = desc.value()[0];
+ if (desc.value().length > 1) {
+ //System.out.println("[Command Warning] Multiline descriptions not supported here. Keep it short for: " + targetIdentifier);
+ }
+ if (descString != null && descString.isEmpty()) {
+ descString = null;
+ }
+ } else {
+ descString = null;
+ }
+
+ return descString;
+ }
+
+}