我有以下课程。我已将我的问题放在代码中。
public class Spec<E> implements Specification<E> {
@Override
public Predicate toPredicate(Root<E> root, CriteriaQuery<?> query,
CriteriaBuilder builder, String key) {
// I need to check if the string "key" is a a declared field of the type E,
// and if the Java type of the field is ZonedDateTime, apply a different
// logic
// How can I do this ?
}
}