title: How can I extend Java code generated by JAXB, CXF or Hibernate tools?
body: <p>With generated Java source code, like</p>
  
  <ul>
  <li>code generated with Hibernate tools</li>
  <li>code generated with JAXB schema binding (xjc)</li>
  <li>code generated with WDSL2Java (cxf)</li>
  </ul>
  
  <p>all generated classes are "value object" types, without business logic. And if I add methods to the generated source code, I will loose these methods if I repeat the source code generation.</p>
  
  <p>Do these Java code generation tools offer ways to "extend" the generated code?</p>
  
  <p>For example, </p>
  
  <ul>
  <li>to override the ToString method (for logging)</li>
  <li>to implement the visitor pattern (for data analysis / validation)</li>
  </ul>