parent = registry;
cache = new HashMap<Type, Template<Type>>();
genericCache = new HashMap<Type, GenericTemplate>();
if (parent == null) {
registerTemplates();
chain = new TemplateBuilderChain();
chain.init(this);
} else {
chain = registry.chain;
}
}