}
private void createConverter(final JavaPackage javaPackage,
final JavaType entity) {
// Create type annotation for new converter class
final JavaType converterType = new JavaType(
javaPackage.getFullyQualifiedPackageName() + "."
+ entity.getSimpleTypeName() + "Converter");
final AnnotationMetadataBuilder annotationBuilder = new AnnotationMetadataBuilder(
ROO_JSF_CONVERTER);
annotationBuilder.addClassAttribute("entity", entity);
final String declaredByMetadataId = PhysicalTypeIdentifier
.createIdentifier(converterType,
pathResolver.getFocusedPath(Path.SRC_MAIN_JAVA));
final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
declaredByMetadataId, Modifier.PUBLIC, converterType,
PhysicalTypeCategory.CLASS);
cidBuilder.addAnnotation(annotationBuilder);
cidBuilder.addImplementsType(JsfJavaType.CONVERTER);
typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
shell.flash(Level.FINE,
"Created " + converterType.getFullyQualifiedTypeName(),
JsfOperationsImpl.class.getName());
shell.flash(Level.FINE, "", JsfOperationsImpl.class.getName());
}