summaryrefslogtreecommitdiff
path: root/dicore3/command/src/main/java/io/dico/dicore/command/annotation/Desc.java
blob: ab3e5556cd5974330c1381ebad61feb0347b0823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package io.dico.dicore.command.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
public @interface Desc {

    /**
     * Multiline description if {@link #shortVersion} is set.
     * Otherwise, this should be an array with one element (aka, you don't have to add array brackets).
     *
     * @return the multiline description.
     * @see CommandAnnotationUtils#getShortDescription(Desc)
     */
    String[] value();

    /**
     * Short description, use if {@link #value} is multi-line.
     * To get a short description from a {@link Desc}, you should use {@link CommandAnnotationUtils#getShortDescription(Desc)}
     *
     * @return short description
     * @see CommandAnnotationUtils#getShortDescription(Desc)
     */
    String shortVersion() default "";

}