001package com.ericlam.mc.eld.annotations;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008/**
009 * 多態指令參數
010 */
011@Target(ElementType.FIELD)
012@Retention(RetentionPolicy.RUNTIME)
013public @interface DynamicArg {
014
015    /**
016     * 參數順序
017     * @return 參數順序
018     */
019    int order();
020
021    /**
022     * 可能的參數類型 (順序)
023     * @return 可能的參數類型
024     */
025    Class<?>[] types();
026
027    /**
028     * 自定義參數顯示
029     * @return 自定義參數顯示
030     */
031    String[] labels() default {};
032
033    /**
034     * 可填參數
035     * @return 是否為可填參數
036     */
037    boolean optional() default false;
038
039}