dimanche 23 juin 2019

how to find field that annotated with spcific annotation by reflection?

how can find a field that annotated whit annotation when annotation have a value ?

for example i want finding a field in entity that annotated with

@customAnnotation( name = "field1" )
private String fileName ;

Is there any way to find field (fileName in example) directly by the reflection (java reflection or reflection library ) and not use the loop and the comparison?





Aucun commentaire:

Enregistrer un commentaire