org.msgpack.template.builder
Class JavassistTemplateBuilder
java.lang.Object
org.msgpack.template.builder.AbstractTemplateBuilder
org.msgpack.template.builder.JavassistTemplateBuilder
- All Implemented Interfaces:
- TemplateBuilder
- Direct Known Subclasses:
- JavassistBeansTemplateBuilder
public class JavassistTemplateBuilder
- extends AbstractTemplateBuilder
Field Summary |
protected javassist.ClassPool |
pool
|
protected int |
seqId
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pool
protected javassist.ClassPool pool
seqId
protected int seqId
JavassistTemplateBuilder
public JavassistTemplateBuilder(TemplateRegistry registry)
matchType
public boolean matchType(Type targetType,
boolean hasAnnotation)
addClassLoader
public void addClassLoader(ClassLoader cl)
makeCtClass
protected javassist.CtClass makeCtClass(String className)
getCtClass
protected javassist.CtClass getCtClass(String className)
throws javassist.NotFoundException
- Throws:
javassist.NotFoundException
nextSeqId
protected int nextSeqId()
createBuildContext
protected BuildContext createBuildContext()
buildTemplate
public <T> Template<T> buildTemplate(Class<T> targetClass,
FieldEntry[] entries)
- Specified by:
buildTemplate
in class AbstractTemplateBuilder
writeTemplate
public void writeTemplate(Type targetType,
String directoryName)
- Specified by:
writeTemplate
in interface TemplateBuilder
- Overrides:
writeTemplate
in class AbstractTemplateBuilder
loadTemplate
public <T> Template<T> loadTemplate(Type targetType)
- Specified by:
loadTemplate
in interface TemplateBuilder
- Overrides:
loadTemplate
in class AbstractTemplateBuilder
Copyright © 2011. All Rights Reserved.