Creating Custom Annotation in Java to force UPPER or lower Case

后端 未结 2 1127
猫巷女王i
猫巷女王i 2021-01-28 03:59

Appreciate any help for creating custom annotation in JAVA by forcing Upper or Lower case for a pojo field. Like to get something like below

// CaseMode enum wou         


        
2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-28 04:24

    Your statement // NEED HELP HERE should be according to the following:

    @Target({ElementType.FIELD, ElementType.METHOD})
    @Retention(RetentionPolicy.RUNTIME)
    public @interface Case {
        CaseMode value();
    }
    

    If you think that you can have some code in there then you are wrong.

提交回复
热议问题