注釈は、HashMap などの複雑な戻り値の型を持つことができます。
私は次のようなものを探しています:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface column {
public HashMap<String, String> table();
}
だから私は(疑似コード)のように注釈を付けた定数を持つことができます:
@column({table=(dbName, tableName), table=(dbName, tableName2)})
public static final String USER_ID = "userid";
Annotation で複雑な戻り値の型を使用できない場合、この種の場合の適切な方法はありますか?