Mercurial > hg > Members > kazz > msgpack
changeset 4:c39707282598
add jar library for msgpack
author | one |
---|---|
date | Fri, 12 Aug 2011 03:43:01 +0900 |
parents | 52e5fa933097 |
children | 283ddbe5e7dc |
files | .classpath lib/msgpack-0.6.0-devel-sources.jar lib/msgpack-0.6.0-devel.jar src/org/msgpack/test/Employee.java src/org/msgpack/test/MessagePackTest.java |
diffstat | 5 files changed, 25 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/.classpath Mon Aug 01 13:41:47 2011 +0900 +++ b/.classpath Fri Aug 12 03:43:01 2011 +0900 @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="lib" path="lib/msgpack-0.6.0-devel.jar" sourcepath="lib/msgpack-0.6.0-devel-sources.jar"/> + <classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/> + <classpathentry kind="lib" path="lib/slf4j-api-1.6.1-sources.jar"/> + <classpathentry kind="lib" path="lib/slf4j-api-1.6.1.jar"/> + <classpathentry kind="lib" path="lib/slf4j-log4j12-1.6.1.jar"/> + <classpathentry kind="lib" path="lib/javassist.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath>
--- a/src/org/msgpack/test/Employee.java Mon Aug 01 13:41:47 2011 +0900 +++ b/src/org/msgpack/test/Employee.java Fri Aug 12 03:43:01 2011 +0900 @@ -1,17 +1,17 @@ package org.msgpack.test; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.msgpack.annotation.MessagePackMessage; @MessagePackMessage public class Employee { public String name; public int age; - - public Employee() {} - - public Employee(String name, int age) { - this.name = name; - this.age = age; - } - + public List<String> list = new ArrayList<String>(); + public Map<String, Integer> hash = new HashMap<String, Integer>(); + public Employee2 next = new Employee2(); }
--- a/src/org/msgpack/test/MessagePackTest.java Mon Aug 01 13:41:47 2011 +0900 +++ b/src/org/msgpack/test/MessagePackTest.java Fri Aug 12 03:43:01 2011 +0900 @@ -7,7 +7,17 @@ public class MessagePackTest { public static void main(String args[]) { - Employee src = new Employee("taro", 25); + Employee src = new Employee(); + src.name = "taro"; + src.age = 25; + src.list.add("test1"); + src.list.add("test2"); + src.list.add("test3"); + src.hash.put("key1", 100); + src.hash.put("key2", 101); + src.hash.put("key3", 102); + src.next.name = "jiro"; + src.next.age = 23; MessagePack msgpack = new MessagePack(); msgpack.register(Employee.class); try {