Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/main/java/org/msgpack/template/builder/BuildContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ public BuildContext(JavassistTemplateBuilder director) {
protected Template build(final String className) {
try {
reset(className, false);
LOG.debug("started generating template class %s for original class %s",
LOG.debug("started generating template class %s for original class %s",
new Object[] { tmplCtClass.getName(), className });
buildClass();
buildConstructor();
buildMethodInit();
buildWriteMethod();
buildReadMethod();
LOG.debug("finished generating template class %s for original class %s",
LOG.debug("finished generating template class %s for original class %s",
new Object[] { tmplCtClass.getName(), className });
return buildInstance(createClass());
} catch (Exception e) {
Expand Down Expand Up @@ -113,7 +113,7 @@ protected void buildWriteMethod() throws CannotCompileException,
director.getCtClass(Object.class.getName()),
CtClass.booleanType
};
CtClass[] exceptTypes = new CtClass[] {
CtClass[] exceptTypes = new CtClass[] {
director.getCtClass(IOException.class.getName())
};
LOG.debug("compiling write method body: %s", new Object[] { mbody });
Expand Down Expand Up @@ -195,6 +195,8 @@ protected String primitiveWriteName(Class<?> type) {
return "writeFloat";
} else if (type == double.class) {
return "writeDouble";
} else if (type == char.class) {
return "writeInt";
}
return null;
}
Expand All @@ -214,6 +216,8 @@ protected String primitiveReadName(Class<?> type) {
return "readFloat";
} else if (type == double.class) {
return "readDouble";
} else if (type == char.class) {
return "readInt";
}
return null;
}
Expand Down