Top Fields Constructors Methods
com.sun.tools.jxc.api.impl.j2s

pack-priv final Class JAXBModelImpl

extends Object
implements J2SJAXBModel
Class Inheritance
All Implemented Interfaces
com.sun.tools.jxc.api.J2SJAXBModel, com.sun.tools.xjc.api.J2SJAXBModel, com.sun.tools.xjc.api.JAXBModel
Imports
java.io.IOException, java.util.ArrayList, .Collection, .HashMap, .Iterator, .List, .Map, jakarta.xml.bind.SchemaOutputResolver, jakarta.xml.bind.annotation.XmlList, jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter, javax.xml.namespace.QName, javax.xml.transform.Result, javax.lang.model.element.ExecutableElement, .TypeElement, .VariableElement, javax.lang.model.type.TypeMirror, com.sun.tools.xjc.api.ErrorListener, com.sun.tools.jxc.api.J2SJAXBModel, .Reference, org.glassfish.jaxb.core.v2.model.annotation.AnnotationReader, org.glassfish.jaxb.core.v2.model.core.ArrayInfo, .ClassInfo, .Element, .ElementInfo, .EnumLeafInfo, .NonElement, .Ref, .TypeInfoSet, org.glassfish.jaxb.core.v2.model.nav.Navigator, org.glassfish.jaxb.runtime.v2.schemagen.XmlSchemaGenerator, com.sun.xml.txw2.output.ResultFactory

References Deprecated

J2SJAXBModel is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private final Map<QName, Reference>
private final List<String>
private final AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement>
private final Map<Reference, NonElement<TypeMirror, TypeElement>>
refMap

Look up table from an externally visible Reference object to our internal format.

private final TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement>
private XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>
xsdgen

Lazily created schema generator.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
generateEpisodeFile(Result output)

Implements com.sun.tools.jxc.api.J2SJAXBModel.generateEpisodeFile.

Generates the episode file from the model.

public void
generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener)

Implements com.sun.tools.jxc.api.J2SJAXBModel.generateSchema.

Generates the schema documents from the model.

public List<String>
getClassList()

Implements com.sun.tools.xjc.api.JAXBModel.getClassList.

Returns a list of fully-qualified class names, which should be used at the runtime to create a new JAXBContext.

private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>
private NonElement<TypeMirror, TypeElement>
public QName
getXmlTypeName(Reference javaType)

Implements com.sun.tools.jxc.api.J2SJAXBModel.getXmlTypeName.

Returns the name of the XML Type bound to the specified Java type.

public QName
getXmlTypeName(Reference javaType)

Implements com.sun.tools.xjc.api.J2SJAXBModel.getXmlTypeName.

References Deprecated Reference is deprecated or references (maybe indirectly) at least one deprecated element.

Returns the name of the XML Type bound to the specified Java type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

additionalElementDeclsback to summary
private final Map<QName, Reference> additionalElementDecls
classListback to summary
private final List<String> classList
readerback to summary
private final AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader
refMapback to summary
private final Map<Reference, NonElement<TypeMirror, TypeElement>> refMap

Look up table from an externally visible Reference object to our internal format.

typesback to summary
private final TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types
xsdgenback to summary
private XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> xsdgen

Lazily created schema generator.

Constructor Detail

JAXBModelImplback to summary
public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types, AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader, Collection<Reference> rootClasses, Map<QName, Reference> additionalElementDecls)

Method Detail

generateEpisodeFileback to summary
public void generateEpisodeFile(Result output)

Implements com.sun.tools.jxc.api.J2SJAXBModel.generateEpisodeFile.

Doc from com.sun.tools.jxc.api.J2SJAXBModel.generateEpisodeFile.

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.

Annotations
@Override
generateSchemaback to summary
public void generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener) throws IOException

Implements com.sun.tools.jxc.api.J2SJAXBModel.generateSchema.

Doc from com.sun.tools.jxc.api.J2SJAXBModel.generateSchema.

Generates the schema documents from the model.

Annotations
@Override
Exceptions
IOException:
if SchemaOutputResolver throws an IOException.
getClassListback to summary
public List<String> getClassList()

Implements com.sun.tools.xjc.api.JAXBModel.getClassList.

Doc from com.sun.tools.xjc.api.JAXBModel.getClassList.

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.

Annotations
@Override
@SuppressWarnings:deprecation
getSchemaGeneratorback to summary
private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator()
getXmlTypeback to summary
private NonElement<TypeMirror, TypeElement> getXmlType(Reference r)
getXmlTypeNameback to summary
public QName getXmlTypeName(Reference javaType)

Implements com.sun.tools.jxc.api.J2SJAXBModel.getXmlTypeName.

Doc from com.sun.tools.jxc.api.J2SJAXBModel.getXmlTypeName.

Returns the name of the XML Type bound to the specified Java type.

Annotations
@Override
getXmlTypeNameback to summary
public QName getXmlTypeName(Reference javaType)

Implements com.sun.tools.xjc.api.J2SJAXBModel.getXmlTypeName.

Doc from com.sun.tools.xjc.api.J2SJAXBModel.getXmlTypeName.

References Deprecated

Reference is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns the name of the XML Type bound to the specified Java type.

Annotations
@Override
@SuppressWarnings:removal