use of javax.persistence.Access in project querydsl by querydsl.
the class JPAConfiguration method getConfig.
@Override
public VisitorConfig getConfig(TypeElement e, List<? extends Element> elements) {
Access access = e.getAnnotation(Access.class);
if (access != null) {
if (access.value() == AccessType.FIELD) {
return VisitorConfig.FIELDS_ONLY;
} else {
return VisitorConfig.METHODS_ONLY;
}
}
boolean fields = false, methods = false;
for (Element element : elements) {
if (hasRelevantAnnotation(element)) {
fields |= element.getKind().equals(ElementKind.FIELD);
methods |= element.getKind().equals(ElementKind.METHOD);
}
}
return VisitorConfig.get(fields, methods, VisitorConfig.ALL);
}
Aggregations