public Object t(Object obj) throws Exception { Object[] o = (Object[]) obj; if (o.length != 2) throw new Exception("Wrong data number: " + o.length); List cut = (List) o[0]; T t = (T) o[1]; Object[] oo = new Object[cut.size()]; for (int i = 0; i < cut.size(); i++) oo[i] = t.t(cut.get(i)); if (oo.length == 2 && oo[1] instanceof Integer) { if (oo[0] instanceof T) return loop_t.t(oo); if (oo[0] instanceof H) return loop_h.t(oo); throw new Exception("Invalid pipe chain"); } T[] tt = (T[]) toArray_t.t(oo); if (tt != null) return pipe_t.t(tt); H[] hh = (H[]) toArray_h.t(oo); if (hh != null) return pipe_h.t(hh); Map[] maps = (Map[]) toArray_map.t(oo); if (maps != null) return pipe_map.t(maps); List[] lists = (List[]) toArray_list.t(oo); if (lists != null) return pipe_list.t(lists); throw new Exception("Invalid pipe chain"); }
public Object t(Object obj) throws Exception { Map m = (Map) obj; Map r = new HashMap(); Iterator it = m.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); Object value = m.get(key); r.put(key, t.t(value)); } return r; }
public Object t(Object obj) throws Exception { Object r = obj; for (T t : tt) r = t.t(r); return r; }
public Object t(Object obj) throws Exception { return parser.t(obj); }