Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rawFields <- xClass.getDeclaredProperty("field");
rawProperties <- xClass.getDeclaredProperty("property");
// handle explicit ones first
for (Xmember m in rawFields) {
if(m.getAnnotations(AccessType.class).getType() == FIELD)) {
field.add(m);
rawFields.remove(m);
}
if(m.getAnnotations(AccessType.class).getType() == PROPERTY)) {
property.add(m);
rawFields.remove(m);
}
}
for (Xmember m in rawProperties) {
// explicit
if(m.getAnnotations(AccessType.class).getType() == FIELD)) {
field.add(m);
rawProperties.remove(m);
}
if(m.getAnnotations(AccessType.class).getType() == PROPERTY)) {
property.add(m);
rawProperties.remove(m);
}
}
// handle remaining ones based on entity access type
// explicit ones are filtered by the previous process
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment