All pastes #123541 Raw Edit

Something

public java v1 · immutable
·published 2006-08-09 11:30 UTC
rendered paste body
            else if (Tuple.class.isAssignableFrom(r)) {               Constructor con = r.getDeclaredConstructors()[0];               Field[] fs = r.getDeclaredFields();               Type[] ts = new Type[fs.length];               for (Field f : fs) {                  Position pos = f.getAnnotation(Position.class);                  if (null == pos) continue;                  ts[pos.value()] = f.getGenericType();               }               Object[] oldparams = ((Tuple) parameters[i]).getParameters();               Object[] newparams = convertParameters(oldparams, ts);               try {                  parameters[i] = con.newInstance(newparams);               } catch (Exception e) {                  throw new DBusException("Failure in serializing parameters: "+e.getMessage());               }            }