示例#1
0
 @Override
 public Object visit(Constant<?> expr, Void context) {
   if (Enum.class.isAssignableFrom(expr.getType())) {
     return ((Enum<?>) expr.getConstant()).name();
   } else {
     return expr.getConstant();
   }
 }
 @Override
 public Void visit(Constant<?> expr, Stack<String> context) {
   throw new IllegalStateException("Detected " + expr.getType() + " in path expression!");
 }
示例#3
0
 @Override
 public boolean wrapConstant(Constant<?> expr) {
   // related : https://hibernate.onjira.com/browse/HHH-6913
   Class<?> type = expr.getType();
   return type.isArray() || Collection.class.isAssignableFrom(type);
 }