* the class declaration.</p>
*/
private void prefix() throws Exception {
// Acquire the config bean for our base component
ComponentBean base = configBean.getComponent(cb.getBaseComponentType());
if (base == null) {
throw new IllegalArgumentException("No base component type for '" +
cb.getComponentType() + "'");
}
// Generate the copyright information
writer.writeBlockComment(
propManager.getProperty(PropertyManager.COPYRIGHT));
// Generate the package declaration
writer.writePackage("javax.faces.component.html");
writer.write('\n');
// Generate the imports
writer.writeImport("java.io.IOException");
writer.writeImport("java.util.List");
writer.writeImport("java.util.ArrayList");
writer.writeImport("java.util.Arrays");
writer.write('\n');
writer.writeImport("javax.faces.context.FacesContext");
writer.writeImport("javax.el.MethodExpression");
writer.writeImport("javax.el.ValueExpression");
writer.write("\n\n");
writer.writeBlockComment("******* GENERATED CODE - DO NOT EDIT *******");
writer.write("\n\n");
// Generate the class JavaDocs (if any)
DescriptionBean db = cb.getDescription("");
String rendererType = cb.getRendererType();
String description = null;
if (db != null) {
description = db.getDescription().trim();
}
if (rendererType != null) {
if (description == null) {
description = "";
}
description +=
"\n<p>By default, the <code>rendererType</code> property must be set to \"<code>" +
rendererType +
"</code>\".\nThis value can be changed by calling the <code>setRendererType()</code> method.</p>\n";
}
if (description != null && description.length() > 0) {
writer.writeJavadocComment(description);
}
// Generate the class declaration
writer.writePublicClassDeclaration(shortName(cb.getComponentClass()),
base.getComponentClass(),
null, false, false);
writer.write("\n\n");
writer.indent();