mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-20 13:33:51 +01:00
Merge branch 'master' of git@github.com:msgpack/msgpack
This commit is contained in:
commit
29e99e229b
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.msgpack</groupId>
|
<groupId>org.msgpack</groupId>
|
||||||
<artifactId>msgpack</artifactId>
|
<artifactId>msgpack</artifactId>
|
||||||
<version>0.3</version>
|
<version>0.4</version>
|
||||||
<description>MessagePack for Java</description>
|
<description>MessagePack for Java</description>
|
||||||
|
|
||||||
<name>MessagePack for Java</name>
|
<name>MessagePack for Java</name>
|
||||||
|
@ -23,6 +23,10 @@ import java.util.Map;
|
|||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
||||||
public abstract class MessagePackObject implements Cloneable, MessagePackable {
|
public abstract class MessagePackObject implements Cloneable, MessagePackable {
|
||||||
|
static {
|
||||||
|
Templates.load();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isNil() {
|
public boolean isNil() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ package org.msgpack;
|
|||||||
import org.msgpack.template.*;
|
import org.msgpack.template.*;
|
||||||
|
|
||||||
public class Templates {
|
public class Templates {
|
||||||
|
public static void load() { }
|
||||||
|
|
||||||
public static Template tList(Template elementTemplate) {
|
public static Template tList(Template elementTemplate) {
|
||||||
return new ListTemplate(elementTemplate);
|
return new ListTemplate(elementTemplate);
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,9 @@ import org.msgpack.annotation.MessagePackOrdinalEnum;
|
|||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public class Unpacker implements Iterable<MessagePackObject> {
|
public class Unpacker implements Iterable<MessagePackObject> {
|
||||||
|
static {
|
||||||
|
Templates.load();
|
||||||
|
}
|
||||||
|
|
||||||
// buffer:
|
// buffer:
|
||||||
// +---------------------------------------------+
|
// +---------------------------------------------+
|
||||||
|
@ -18,8 +18,6 @@ public class TestReflectionPackerTemplate {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPackConvert() throws Exception {
|
public void testPackConvert() throws Exception {
|
||||||
tString(); // FIXME link StringTemplate
|
|
||||||
|
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
|
||||||
MessagePacker packer = ReflectionPacker.create(StringFieldClass.class);
|
MessagePacker packer = ReflectionPacker.create(StringFieldClass.class);
|
||||||
@ -45,8 +43,6 @@ public class TestReflectionPackerTemplate {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPackConvert02() throws Exception {
|
public void testPackConvert02() throws Exception {
|
||||||
tString(); // FIXME link StringTemplate
|
|
||||||
|
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
|
||||||
CustomPacker.register(StringFieldClass.class, ReflectionPacker.create(StringFieldClass.class));
|
CustomPacker.register(StringFieldClass.class, ReflectionPacker.create(StringFieldClass.class));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user