com.sun.tools.xjc.api.impl.j2s
Class JAXBModelImpl

java.lang.Object
  extended by com.sun.tools.xjc.api.impl.j2s.JAXBModelImpl
All Implemented Interfaces:
J2SJAXBModel, JAXBModel

final class JAXBModelImpl
extends Object
implements J2SJAXBModel


Constructor Summary
JAXBModelImpl(TypeInfoSet<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration> types, AnnotationReader<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration> reader, Collection<Reference> rootClasses, Map<QName,Reference> additionalElementDecls)
           
 
Method Summary
 void generateEpisodeFile(Result output)
          Generates the episode file from the model.
 void generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener)
          Generates the schema documents from the model.
 List<String> getClassList()
          Returns a list of fully-qualified class names, which should be used at the runtime to create a new JAXBContext.
 QName getXmlTypeName(Reference javaType)
          Returns the name of the XML Type bound to the specified Java type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBModelImpl

public JAXBModelImpl(TypeInfoSet<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration> types,
                     AnnotationReader<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration> reader,
                     Collection<Reference> rootClasses,
                     Map<QName,Reference> additionalElementDecls)
Method Detail

getClassList

public List<String> getClassList()
Description copied from interface: JAXBModel
Returns a list of fully-qualified class names, which should be used at the runtime to create a new JAXBContext.

Until the JAXB team fixes the bootstrapping issue, we have two bootstrapping methods. This one is to use a list of class names to call JAXBContext.newInstance(Class[]) method. If this method returns non-null, the caller is expected to use that method. This is meant to be a temporary workaround.

Specified by:
getClassList in interface JAXBModel
Returns:
non-null read-only list.

getXmlTypeName

public QName getXmlTypeName(Reference javaType)
Description copied from interface: J2SJAXBModel
Returns the name of the XML Type bound to the specified Java type.

Specified by:
getXmlTypeName in interface J2SJAXBModel
Parameters:
javaType - must not be null. This must be one of the References specified in the JavaCompiler.bind(java.util.Collection, java.util.Map, java.lang.String, com.sun.mirror.apt.AnnotationProcessorEnvironment) method.
Returns:
null if it is not a part of the input to JavaCompiler.bind(java.util.Collection, java.util.Map, java.lang.String, com.sun.mirror.apt.AnnotationProcessorEnvironment).

generateSchema

public void generateSchema(SchemaOutputResolver outputResolver,
                           ErrorListener errorListener)
                    throws IOException
Description copied from interface: J2SJAXBModel
Generates the schema documents from the model.

Specified by:
generateSchema in interface J2SJAXBModel
Parameters:
outputResolver - this object controls the output to which schemas will be sent.
Throws:
IOException - if SchemaOutputResolver throws an IOException.

generateEpisodeFile

public void generateEpisodeFile(Result output)
Description copied from interface: J2SJAXBModel
Generates the episode file from the model.

The "episode file" is really just a JAXB customization file (but with vendor extensions, at this point), that can be used later with a schema compilation to support separate compilation.

Specified by:
generateEpisodeFile in interface J2SJAXBModel
Parameters:
output - This receives the generated episode file.