我是一个新的Java程序员。以下是我的代码:
public void testSimple1(String lotteryName,
int useFrequence,
Date validityBegin,
Date validityEnd,
LotteryPasswdEnum lotteryPasswd,
LotteryExamineEnum lotteryExamine,
LotteryCarriageEnum lotteryCarriage,
@TestMapping(key = "id", csvFile = "lottyScope.csv") xxxxxxxx lotteryScope,
@TestMapping(key = "id", csvFile = "lotteryUseCondition.csv") xxxxxxxx lotteryUseCondition,
@TestMapping(key = "id", csvFile = "lotteryFee.csv") xxxxxxxx lotteryFee)
我想得到所有提交的注释。一些字段是注释的,有些字段不是。
我知道如何使用method.getParameterAnnotations()函数,但它只返回三个注释。
我不知道如何对应他们。
我期待以下结果:
lotteryName - none
useFrequence- none
validityBegin -none
validityEnd -none
lotteryPasswd -none
lotteryExamine-none
lotteryCarriage-none
lotteryScope - @TestMapping(key = "id", csvFile = "lottyScope.csv")
lotteryUseCondition - @TestMapping(key = "id", csvFile = "lotteryUseCondition.csv")
lotteryFee - @TestMapping(key = "id", csvFile = "lotteryFee.csv")