public class ValueClassModelFactory {
private static final String VISITOR_SUFFIX = "Visitor";
private static final String VALUE_SUFFIX = "Value";
public static JDefinedClass createValueClass(JDefinedClass jVisitorModel, GenerateValueClassForVisitor annotation) throws SourceException, CodeGenerationException, ErrorTypeFound {
ValueVisitorInterfaceModel visitorModel = ValueVisitorInterfaceModel.createInstance(jVisitorModel, annotation);
Serialization serialization = serialization(annotation);
String valueClassName = valueClassName(jVisitorModel, annotation);
ValueClassModelFactory factory = new ValueClassModelFactory(jVisitorModel._package(), valueClassName, serialization, annotation);
ValueClassModel valueClassModel = factory.createValueClass(visitorModel);
return valueClassModel.getJDefinedClass();