Example:
@Value
@Builder(toBuilder = true)
@AllArgsConstructor(access = AccessLevel.PUBLIC)
public class A {
//
// RecordRootable fields
//
@NonNull
private UUID a;
}
Looking at the class file the @NonNull annotation seems to be present if the IntelliJ decompiler is not lying.
Now we want to read the annotation from the Field using Field.getAnnotations or something similar at runtime but nothing is found.
Is there any particular method I can use to read this annotation?
Is there anything extra I need to add to the annotation to be able to read it?
Aucun commentaire:
Enregistrer un commentaire