public static Object getAndWrap(Field field, Object target) { try { return get(field, target); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IllegalArgumentException("exception setting: " + field.getName(), e); } }
public static Object getAndWrap(Field field, Object target) { try { return get(field, target); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new IllegalArgumentException("exception setting: " + field.getName(), e); } }
List<Object[]> updated = new ArrayList<Object[]>(); List<?> queuedOperations = get(newColl, "operationQueue", List.class); for (Object op : queuedOperations) { added.add(new Object[] { get(op, "index"), get(op, "value") }); added.add(new Object[] { null, get(op, "value") }); added.add(new Object[] { get(op, "index"), get(op, "value") }); removed.add(new Object[] { get(op, "index"), get(op, "old") }); removed.add(new Object[] { null, get(op, "value") }); updated.add(new Object[] { get(op, "index"), get(op, "value") }); if (value != null && value.getClass().isAnnotationPresent(Entity.class)) { org.granite.util.Entity e = new org.granite.util.Entity(value); value = new ChangeRef(e.getName(), (String)get(value, "uid"), (Serializable)e.getIdentifier());