Package com.metaparadigm.jsonrpc

Examples of com.metaparadigm.jsonrpc.ObjectMatch


    }
    if (match == 0) {
      throw new UnmarshallException("bean has no matches");
    }

    ObjectMatch m = null, tmp;
    i = jso.keys();
    while (i.hasNext()) {
      String field = (String) i.next();
      Method setMethod = bd.writableProps.get(field);
      if (setMethod != null) {
        try {
          Class[] param = setMethod.getParameterTypes();
          if (param.length != 1) {
            throw new UnmarshallException("bean " + clazz.getName() + " method "
                + setMethod.getName() + " does not have one arg");
          }
          tmp = ser.tryUnmarshall(state, param[0], jso.get(field));
          if (m == null) {
            m = tmp;
          } else {
            m = m.max(tmp);
          }
        } catch (UnmarshallException e) {
          throw new UnmarshallException("bean " + clazz.getName() + " " + e.getMessage());
        }
      } else {
        mismatch++;
      }
    }
    return m.max(new ObjectMatch(mismatch));
  }
View Full Code Here

TOP

Related Classes of com.metaparadigm.jsonrpc.ObjectMatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.