All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.tools.xjc.api.J2SJAXBModel Maven / Gradle / Ivy

Go to download

Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources. In other words: the *tool* to generate java classes for the given xml representation.

There is a newer version: 4.0.5
Show newest version
package com.sun.tools.xjc.api;

import java.io.IOException;

import javax.xml.bind.SchemaOutputResolver;
import javax.xml.namespace.QName;

/**
 * {@link JAXBModel} that exposes additional information available
 * only for the java->schema direction.
 *
 * @author Kohsuke Kawaguchi
 */
public interface J2SJAXBModel extends JAXBModel {
    /**
     * Returns the name of the XML Type bound to the
     * specified Java type.
     *
     * @param javaType
     *      must not be null. This must be one of the {@link Reference}s specified
     *      in the {@link JavaCompiler#bind} method.
     *
     * @return
     *      null if it is not a part of the input to {@link JavaCompiler#bind}.
     *
     * @throws IllegalArgumentException
     *      if the parameter is null
     */
    QName getXmlTypeName(Reference javaType);

    /**
     * Generates the schema documents from the model.
     *
     * 

* The caller can use the additionalElementDecls parameter to * add element declarations to the generate schema. * For example, if the JAX-RPC passes in the following entry: * * {foo}bar -> DeclaredType for java.lang.String * * then JAXB generates the following element declaration (in the schema * document for the namespace "foo")" * * <xs:element name="bar" type="xs:string" /> * * This can be used for generating schema components necessary for WSDL. * * @param outputResolver * this object controls the output to which schemas * will be sent. * * @throws IOException * if {@link SchemaOutputResolver} throws an {@link IOException}. */ void generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener) throws IOException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy