com.sun.tools.xjc.api
Class XJC

java.lang.Object
  extended by com.sun.tools.xjc.api.XJC

public final class XJC
extends java.lang.Object

Entry point to the programatic API to access schema compiler (XJC) and schema generator (schemagen).


Constructor Summary
XJC()
           
 
Method Summary
static JavaCompiler createJavaCompiler()
          Gets a fresh JavaCompiler.
static SchemaCompiler createSchemaCompiler()
          Gets a fresh SchemaCompiler.
static java.lang.String getDefaultPackageName(java.lang.String namespaceUri)
          Computes the namespace URI -> package name conversion as specified by the JAXB spec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XJC

public XJC()
Method Detail

createJavaCompiler

public static JavaCompiler createJavaCompiler()
Gets a fresh JavaCompiler.

Returns:
always return non-null object.

createSchemaCompiler

public static SchemaCompiler createSchemaCompiler()
Gets a fresh SchemaCompiler.

Returns:
always return non-null object.

getDefaultPackageName

public static java.lang.String getDefaultPackageName(java.lang.String namespaceUri)
Computes the namespace URI -> package name conversion as specified by the JAXB spec.

Parameters:
namespaceUri - Namespace URI. Can be empty, but must not be null.
Returns:
A Java package name (e.g., "foo.bar"). "" to represent the root package. This method returns null if the method fails to derive the package name (there are certain namespace URIs with which this algorithm does not work --- such as ":::" as the URI.)