简体   繁体   中英

Get property value of annotation (used on a class, not method)

Scenario is something like below...

@Component
@Migration(description="Test Description", serial="")
public class TestUpdate1 {

}

I need to get the value of 的价值
ie

How can I do that

You can possibly get the value like this way

JsonElement jsonElement = methods[i].getAnnotation(JsonElement.class);

int type = jsonElement.type();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM