mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
java: adds TemplateRegistry.setTemplateBuilder method
This commit is contained in:
parent
79197b6ec7
commit
0df3da6b10
2 changed files with 5 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ public abstract class TemplateBuilder {
|
|||
instance = JavassistTemplateBuilder.getInstance();
|
||||
}
|
||||
|
||||
public synchronized static void setTemplateBuilder(TemplateBuilder builder) {
|
||||
synchronized static void setInstance(TemplateBuilder builder) {
|
||||
instance = builder;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,5 +208,9 @@ public class TemplateRegistry {
|
|||
private static boolean isAnnotated(Class<?> ao, Class<? extends Annotation> with) {
|
||||
return ao.getAnnotation(with) != null;
|
||||
}
|
||||
|
||||
public static void setTemplateBuilder(TemplateBuilder builder) {
|
||||
TemplateBuilder.setInstance(builder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue