2010/11/24 Martin Gainty <mgai...@hotmail.com> > if the <target> attribute is available in object acquired by > invocation.getAction() then you should see the target > > does this answer your question? >
Actually, It doesn't. I meant that conversion methods like convertPrimitive (see the code below) use to take class type and value as argument and they always try to understand the kind of type they're facing, choosing by value (for this reason I called "value driven"). Why don't they choose conversion by type destination? private Object convertPrimitive(Class clazz, Object value, Method method) throws JSONException { if (value == null) { if (Short.TYPE.equals(clazz) || Short.class.equals(clazz)) return (short) 0; ... } else if (value instanceof Number) { Number number = (Number) value; -- Maurizio Cucchiara