Add toString, hashCode, equals while generating JAXB classes in Java
问题 I'm trying to generate JAXB classes from an XSD file programmatically, using Java. I've used the following code snippet to achieve that: .... import java.io.File; import java.io.IOException; import org.xml.sax.InputSource; import com.sun.codemodel.JCodeModel; import com.sun.tools.xjc.api.S2JJAXBModel; import com.sun.tools.xjc.api.SchemaCompiler; import com.sun.tools.xjc.api.XJC; .... .... public static void generateJaxb(String schemaPath, String outputDirectory, String packageName) throws