com.sun.tools.xjc.api
Interface S2JJAXBModel

All Superinterfaces:
JAXBModel

public interface S2JJAXBModel
extends JAXBModel

JAXBModel that exposes additional information available only for the schema->java direction.


Method Summary
 com.sun.codemodel.JCodeModel generateCode(Plugin[] extensions, ErrorListener errorListener)
          Generates artifacts.
 Mapping get(javax.xml.namespace.QName elementName)
          Gets a Mapping object for the given global element.
 java.util.List<com.sun.codemodel.JClass> getAllObjectFactories()
          Gets all the ObjectFactory classes generated by the compilation.
 TypeAndAnnotation getJavaType(javax.xml.namespace.QName xmlTypeName)
          Returns the fully-qualified name of the Java type that is bound to the specified XML type.
 java.util.Collection<? extends Mapping> getMappings()
          Gets a read-only view of all the Mappings.
 
Methods inherited from interface com.sun.tools.xjc.api.JAXBModel
getClassList
 

Method Detail

get

Mapping get(javax.xml.namespace.QName elementName)
Gets a Mapping object for the given global element.

Returns:
null if the element name is not a defined global element in the schema.

getAllObjectFactories

java.util.List<com.sun.codemodel.JClass> getAllObjectFactories()
Gets all the ObjectFactory classes generated by the compilation.

This should be used for generating XmlSeeAlso on the SEI.


getMappings

java.util.Collection<? extends Mapping> getMappings()
Gets a read-only view of all the Mappings.


getJavaType

TypeAndAnnotation getJavaType(javax.xml.namespace.QName xmlTypeName)
Returns the fully-qualified name of the Java type that is bound to the specified XML type.

Parameters:
xmlTypeName - must not be null.
Returns:
null if the XML type is not bound to any Java type.

generateCode

com.sun.codemodel.JCodeModel generateCode(Plugin[] extensions,
                                          ErrorListener errorListener)
Generates artifacts.

TODO: if JAXB supports various modes of code generations (such as public interface only or implementation only or etc), we should define bit flags to control those.

This operation is only supported for a model built from a schema.

Parameters:
extensions - The JAXB RI extensions to run. This can be null or empty array if the caller wishes not to run any extension.
Those specified extensions will participate in the code generation. Specifying an extension in this list has the same effect of turning that extension on via command line.
It is the caller's responsibility to configure each augmenter properly by using Plugin.parseArgument(Options, String[], int).
Returns:
object filled with the generated code. Use JCodeModel.build(CodeWriter) to write them to a disk.