/** * Returns the default deserializer for a class that isn't matched * directly. Application can override this method to produce * bean-style serialization instead of field serialization. * * @param cl the class of the object that needs to be serialized. * @return a serializer object for the serialization. */ @Override protected Deserializer getDefaultDeserializer(Class cl) { return new BeanDeserializer(cl); } }
continue; if (findGetter(methods, name, paramTypes[0]) == null) continue;
public BeanDeserializer(Class cl) { _type = cl; _methodMap = getMethodMap(cl); _readResolve = getReadResolve(cl); Constructor[] constructors = cl.getConstructors(); int bestLength = Integer.MAX_VALUE; for (int i = 0; i < constructors.length; i++) { if (constructors[i].getParameterTypes().length < bestLength) { _constructor = constructors[i]; bestLength = _constructor.getParameterTypes().length; } } if (_constructor != null) { _constructor.setAccessible(true); Class[] params = _constructor.getParameterTypes(); _constructorArgs = new Object[params.length]; for (int i = 0; i < params.length; i++) { _constructorArgs[i] = getParamArg(params[i]); } } }
@Override public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
public Object readMap(AbstractHessianInput in, Object obj) throws IOException { try { int ref = in.addRef(obj); while (!in.isEnd()) { Object key = in.readObject(); Method method = (Method) _methodMap.get(key); if (method != null) { Object value = in.readObject(method.getParameterTypes()[0]); method.invoke(obj, new Object[]{value}); } else { Object value = in.readObject(); } } in.readMapEnd(); Object resolve = resolve(obj); if (obj != resolve) in.setRef(ref, resolve); return resolve; } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
public Object readMap(AbstractHessianInput in, Object obj) throws IOException { try { int ref = in.addRef(obj); while (!in.isEnd()) { Object key = in.readObject(); Method method = (Method) _methodMap.get(key); if (method != null) { Object value = in.readObject(method.getParameterTypes()[0]); method.invoke(obj, new Object[]{value}); } else { Object value = in.readObject(); } } in.readMapEnd(); Object resolve = resolve(obj); if (obj != resolve) in.setRef(ref, resolve); return resolve; } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
public BeanDeserializer(Class cl) { _type = cl; _methodMap = getMethodMap(cl); _readResolve = getReadResolve(cl); Constructor[] constructors = cl.getConstructors(); int bestLength = Integer.MAX_VALUE; for (int i = 0; i < constructors.length; i++) { if (constructors[i].getParameterTypes().length < bestLength) { _constructor = constructors[i]; bestLength = _constructor.getParameterTypes().length; } } if (_constructor != null) { _constructor.setAccessible(true); Class[] params = _constructor.getParameterTypes(); _constructorArgs = new Object[params.length]; for (int i = 0; i < params.length; i++) { _constructorArgs[i] = getParamArg(params[i]); } } }
@Override public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
/** * Returns the default deserializer for a class that isn't matched * directly. Application can override this method to produce * bean-style serialization instead of field serialization. * * @param cl the class of the object that needs to be serialized. * @return a serializer object for the serialization. */ @Override protected Deserializer getDefaultDeserializer(Class cl) { return new BeanDeserializer(cl); } }
public Object readMap(AbstractHessianInput in, Object obj) throws IOException { try { int ref = in.addRef(obj); while (!in.isEnd()) { Object key = in.readObject(); Method method = (Method) _methodMap.get(key); if (method != null) { Object value = in.readObject(method.getParameterTypes()[0]); method.invoke(obj, new Object[]{value}); } else { Object value = in.readObject(); } } in.readMapEnd(); Object resolve = resolve(obj); if (obj != resolve) in.setRef(ref, resolve); return resolve; } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
continue; if (findGetter(methods, name, paramTypes[0]) == null) continue;
public BeanDeserializer(Class cl) { _type = cl; _methodMap = getMethodMap(cl); _readResolve = getReadResolve(cl); Constructor[] constructors = cl.getConstructors(); int bestLength = Integer.MAX_VALUE; for (int i = 0; i < constructors.length; i++) { if (constructors[i].getParameterTypes().length < bestLength) { _constructor = constructors[i]; bestLength = _constructor.getParameterTypes().length; } } if (_constructor != null) { _constructor.setAccessible(true); Class[] params = _constructor.getParameterTypes(); _constructorArgs = new Object[params.length]; for (int i = 0; i < params.length; i++) { _constructorArgs[i] = getParamArg(params[i]); } } }
public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
/** * Returns the default deserializer for a class that isn't matched * directly. Application can override this method to produce * bean-style serialization instead of field serialization. * * @param cl the class of the object that needs to be serialized. * @return a serializer object for the serialization. */ @Override protected Deserializer getDefaultDeserializer(Class cl) { return new BeanDeserializer(cl); } }
public Object readMap(AbstractHessianInput in, Object obj) throws IOException { try { int ref = in.addRef(obj); while (! in.isEnd()) { Object key = in.readObject(); Method method = (Method) _methodMap.get(key); if (method != null) { Object value = in.readObject(method.getParameterTypes()[0]); method.invoke(obj, new Object[] {value }); } else { Object value = in.readObject(); } } in.readMapEnd(); Object resolve = resolve(obj); if (obj != resolve) in.setRef(ref, resolve); return resolve; } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
continue; if (findGetter(methods, name, paramTypes[0]) == null) continue;
public BeanDeserializer(Class cl) { _type = cl; _methodMap = getMethodMap(cl); _readResolve = getReadResolve(cl); Constructor []constructors = cl.getConstructors(); int bestLength = Integer.MAX_VALUE; for (int i = 0; i < constructors.length; i++) { if (constructors[i].getParameterTypes().length < bestLength) { _constructor = constructors[i]; bestLength = _constructor.getParameterTypes().length; } } if (_constructor != null) { _constructor.setAccessible(true); Class []params = _constructor.getParameterTypes(); _constructorArgs = new Object[params.length]; for (int i = 0; i < params.length; i++) { _constructorArgs[i] = getParamArg(params[i]); } } }
@Override public Object readMap(AbstractHessianInput in) throws IOException { try { Object obj = instantiate(); return readMap(in, obj); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOExceptionWrapper(e); } }
/** * Returns the default deserializer for a class that isn't matched * directly. Application can override this method to produce * bean-style serialization instead of field serialization. * * @param cl the class of the object that needs to be serialized. * * @return a serializer object for the serialization. */ protected Deserializer getDefaultDeserializer(Class cl) { return new BeanDeserializer(cl); } }