Open rezaakv opened 4 years ago
Hello everyone, Can assign to me?
Hi everyone, @kathrynkodama
How can I get a type of IField
?
By example:
@Size
private String value;
@Size
private Map map;
I want to get the FQN of filed type (map and value) Because I will need to verify if the type is one java.util.Map or java.util.List etc Is there an example or documentation for help me?
If you have other approach, will be appreciate, thank you 😁
@mcruzdev you can use IField
https://www.ibm.com/support/knowledgecenter/en/SSUFAU_2.0.0/org.eclipse.jdt.doc.isv-3.14.100/reference/api/org/eclipse/jdt/core/class-use/IField.html.
See PersistenceMapKeyDiagnosticsCollector for an example of a diagnostic appearing on a field.
This should be added for Jakarta EE 11
Add diagnostics for these constraints to ensure they are annotated on the supported types.
The main problem is that these annotations work on field types of Collections, Arrays and Map, which should be resolved (before using them to check against the allowed types below) and also the type could be any custom subtype of these interfaces including user made ones.
@NotEmpty
: Supported types are:@Size
: Supported types are: