@Test @SuppressWarnings("unchecked") public void testSerializeJavaBeanDescriptor() throws Exception { JavaBeanDescriptor descriptor = new JavaBeanDescriptor(); JavaBeanDescriptor result = JavaBeanSerializeUtil.serialize(descriptor); Assert.assertTrue(descriptor == result); Map map = new HashMap(); map.put("first", descriptor); result = JavaBeanSerializeUtil.serialize(map); Assert.assertTrue(result.isMapType()); Assert.assertEquals(HashMap.class.getName(), result.getClassName()); Assert.assertEquals(map.size(), result.propertySize()); Object object = result.iterator().next().getValue(); Assert.assertTrue(object instanceof JavaBeanDescriptor); JavaBeanDescriptor actual = (JavaBeanDescriptor)object; Assert.assertEquals(map.get("first"), actual); }
public static JavaBeanDescriptor serialize(Object obj) { return serialize(obj, JavaBeanAccessor.FIELD); }
JavaBeanSerializeUtil { public static JavaBeanDescriptor serialize(Object obj) { return serialize(obj, JavaBeanAccessor.FIELD); } }
JavaBeanSerializeUtil { public static JavaBeanDescriptor serialize(Object obj) { return serialize(obj, JavaBeanAccessor.FIELD); } private  JavaBeanSerializeUtil(); }
JavaBeanSerializeUtil { public static JavaBeanDescriptor serialize(Object obj) { return serialize(obj, JavaBeanAccessor.FIELD); } private  JavaBeanSerializeUtil(); static JavaBeanDescriptor serialize(Object obj); static JavaBeanDescriptor serialize(Object obj, JavaBeanAccessor accessor); static Object deserialize(JavaBeanDescriptor beanDescriptor); static Object deserialize(JavaBeanDescriptor beanDescriptor, ClassLoader loader); static Class<?> name2Class(ClassLoader loader, String name); }
JavaBeanSerializeUtil { public static JavaBeanDescriptor serialize(Object obj) { return serialize(obj, JavaBeanAccessor.FIELD); } private  JavaBeanSerializeUtil(); static JavaBeanDescriptor serialize(Object obj); static JavaBeanDescriptor serialize(Object obj, JavaBeanAccessor accessor); static Object deserialize(JavaBeanDescriptor beanDescriptor); static Object deserialize(JavaBeanDescriptor beanDescriptor, ClassLoader loader); static Class<?> name2Class(ClassLoader loader, String name);  }