appendLine("}");
}
protected void appendInstance() {
StringBuilder sb;
Constructor constructor = template.getConstructor();
List<Parameter> cParams = constructor.getParameters();
appendLine();
appendLine("/**\n"
+ " * Instantiable instance of this GXP\n"
+ " */");
appendAnnotations(template.getJavaAnnotations(JavaAnnotation.Element.INSTANCE));
sb = new StringBuilder("public static class Instance");
appendScalaFormalTypeParameters(sb, true, template.getFormalTypeParameters());
sb.append(" implements Interface");
appendScalaFormalTypeParameters(sb, false, template.getFormalTypeParameters());
sb.append(" {");
appendLine(sb);
for (Parameter param : cParams) {
formatLine("private final %s %s;", toScalaType(param.getType()), param.getPrimaryName());
}
appendLine();
appendAnnotations(constructor.getJavaAnnotations());
sb = new StringBuilder("public Instance(");
COMMA_JOINER.appendTo(sb, Iterables.transform(cParams, parameterToAnnotatedCallParameter));
sb.append(") {");
appendLine(sb);
for (Parameter param : cParams) {