public Void visitTemplateElement(GxpNamespace.GxpElement node) {
TemplateName.FullyQualified name = createRootName(node);
AttributeMap attrMap = nodeParts.getAttributes();
ContentType contentType = createContentType(node, DEFAULT_CONTENT_TYPE);
List<Constructor> constructors = nodeParts.getConstructors();
Constructor constructor = constructors.isEmpty()
? Constructor.empty(node) : constructors.get(0);
if (constructors.size() > 1) {
alertSink.add(new MoreThanOneConstructorError(constructors.get(1)));
}
List<JavaAnnotation> javaAnnotations = getJavaAnnotations(node,
JavaAnnotation.Element.CLASS,
JavaAnnotation.Element.INSTANCE,
JavaAnnotation.Element.INTERFACE);
List<Import> imports = nodeParts.getImports();
List<ImplementsDeclaration> implementsDeclarations = nodeParts.getImplementsDeclarations();
List<ThrowsDeclaration> throwsDeclarations = nodeParts.getThrowsDeclarations();
List<Parameter> parameters = nodeParts.getParameters();
List<FormalTypeParameter> formalTypeParameters = nodeParts.getFormalTypeParameters();
Expression content = getCollapsableContent(attrMap);
if (contentType != null) {
output.accumulate(new Template(node,
name,
contentType.getSchema(),
javaAnnotations,
constructor,
imports,
implementsDeclarations,
throwsDeclarations,