Class CpoClassSourceGenerator

java.lang.Object
org.synchronoss.cpo.core.exporter.AbstractMetaVisitor
org.synchronoss.cpo.core.exporter.CpoClassSourceGenerator
All Implemented Interfaces:
MetaVisitor
Direct Known Subclasses:
CpoLegacyClassSourceGenerator

public class CpoClassSourceGenerator extends AbstractMetaVisitor
The CpoClassSourceGenerator generates java source code to define the cpo classes.
Since:
4/17/12
Author:
Michael Bellomo
  • Constructor Details

    • CpoClassSourceGenerator

      public CpoClassSourceGenerator(CpoMetaDescriptor metaDescriptor)
      Constructs a generator for the given meta descriptor.
      Parameters:
      metaDescriptor - the meta descriptor whose classes will be visited and generated as Java bean source
  • Method Details

    • getClassName

      public String getClassName()
      Gets the name of the last class generated.
      Returns:
      the name of the last class generated by visit(CpoClass), or null if none has been visited yet
    • getSourceCode

      public String getSourceCode()
      Gets the full generated Java source for the class last visited.
      Returns:
      the full generated Java source for the class last visited by visit(CpoClass)
    • visit

      public void visit(CpoClass cpoClass)
      Description copied from interface: MetaVisitor
      Visits a class node in the meta model.
      Parameters:
      cpoClass - the class to be visited
    • visit

      public void visit(CpoAttribute cpoAttribute)
      Description copied from interface: MetaVisitor
      Visits an attribute node in the meta model.
      Parameters:
      cpoAttribute - the attribute to be visited