EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.jaxb.compiler
Class Generator

java.lang.Object
  extended by org.eclipse.persistence.jaxb.compiler.Generator

public class Generator
extends java.lang.Object

INTERNAL:

Purpose:The purpose of this class is to act as an entry point into the TopLink JAXB 2.0 Generation framework

Responsibilities:

This class acts as an entry point into JAXB 2.0 Generation. A Generator is created with a specific set of JAXB 2.0 Annotated classes and then performs actions on those, such as generating schema files, or generating TopLink Projects. Additional information is returned from the schema generation methods as a means of integration with WebServices.

See Also:
AnnotationsProcessor, MappingsGenerator, SchemaGenerator
Author:
mmacivor
Since:
Oracle TopLink 11.1.1.0.0

Constructor Summary
Generator(JavaModelInput jModelInput)
          This is the preferred constructor.
Generator(JavaModelInput jModelInput, java.util.Map<java.lang.String,XmlBindings> xmlBindings, java.lang.ClassLoader cLoader, java.lang.String defaultTargetNamespace)
          This constructor will process and apply the given XmlBindings as appropriate.
Generator(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typeToTypeMappingInfo, java.util.Map<java.lang.String,XmlBindings> xmlBindings, java.lang.ClassLoader cLoader, java.lang.String defaultTargetNamespace)
          This constructor will process and apply the given XmlBindings as appropriate.
Generator(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typeToTypeMappingInfo, java.lang.String defaultTargetNamespace)
          This constructor creates a Helper using the JavaModelInput instance's JavaModel and a map of javaclasses that were generated from Type objects.
 
Method Summary
 SchemaTypeInfo addClass(JavaClass javaClass)
          INTERNAL:
 Project generateProject()
           
 java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> generateSchema()
           
 java.util.HashMap<java.lang.String,SchemaTypeInfo> generateSchemaFiles(SchemaOutputResolver outputResolver, java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements)
           
 java.util.HashMap<java.lang.String,SchemaTypeInfo> generateSchemaFiles(java.lang.String schemaPath, java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements)
           
 AnnotationsProcessor getAnnotationsProcessor()
           
 MappingsGenerator getMappingsGenerator()
           
 java.util.HashMap getMarshalCallbacks()
           
 java.util.HashMap getUnmarshalCallbacks()
           
 boolean hasMarshalCallbacks()
           
 boolean hasUnmarshalCallbacks()
           
 void setTypeToTypeMappingInfo(java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typesToTypeMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator(JavaModelInput jModelInput)
This is the preferred constructor. This constructor creates a Helper using the JavaModelInput instance's JavaModel. Annotations are processed here as well.

Parameters:
jModelInput -

Generator

public Generator(JavaModelInput jModelInput,
                 java.util.Map<java.lang.String,XmlBindings> xmlBindings,
                 java.lang.ClassLoader cLoader,
                 java.lang.String defaultTargetNamespace)
This constructor will process and apply the given XmlBindings as appropriate. Classes declared in the bindings will be amalgamated with any classes in the JavaModelInput. If xmlBindings is null or empty, AnnotationsProcessor will be used to process annotations as per usual.

Parameters:
jModelInput -
xmlBindings - map of XmlBindings keyed on package name
cLoader -

Generator

public Generator(JavaModelInput jModelInput,
                 TypeMappingInfo[] typeMappingInfos,
                 JavaClass[] javaClasses,
                 java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typeToTypeMappingInfo,
                 java.lang.String defaultTargetNamespace)
This constructor creates a Helper using the JavaModelInput instance's JavaModel and a map of javaclasses that were generated from Type objects. Annotations are processed here as well.

Parameters:
jModelInput -

Generator

public Generator(JavaModelInput jModelInput,
                 TypeMappingInfo[] typeMappingInfos,
                 JavaClass[] javaClasses,
                 java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typeToTypeMappingInfo,
                 java.util.Map<java.lang.String,XmlBindings> xmlBindings,
                 java.lang.ClassLoader cLoader,
                 java.lang.String defaultTargetNamespace)
This constructor will process and apply the given XmlBindings as appropriate. Classes declared in the bindings will be amalgamated with any classes in the JavaModelInput. If xmlBindings is null or empty, AnnotationsProcessor will be used to process annotations as per usual.

Parameters:
jModelInput -
javaClassToType -
xmlBindings - map of XmlBindings keyed on package name
cLoader -
Method Detail

hasMarshalCallbacks

public boolean hasMarshalCallbacks()

hasUnmarshalCallbacks

public boolean hasUnmarshalCallbacks()

addClass

public SchemaTypeInfo addClass(JavaClass javaClass)
INTERNAL:

Parameters:
javaClass -
Returns:

generateProject

public Project generateProject()
                        throws java.lang.Exception
Throws:
java.lang.Exception

generateSchema

public java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> generateSchema()

generateSchemaFiles

public java.util.HashMap<java.lang.String,SchemaTypeInfo> generateSchemaFiles(java.lang.String schemaPath,
                                                                              java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements)
                                                                       throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

generateSchemaFiles

public java.util.HashMap<java.lang.String,SchemaTypeInfo> generateSchemaFiles(SchemaOutputResolver outputResolver,
                                                                              java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements)

getUnmarshalCallbacks

public java.util.HashMap getUnmarshalCallbacks()

getMarshalCallbacks

public java.util.HashMap getMarshalCallbacks()

getMappingsGenerator

public MappingsGenerator getMappingsGenerator()

getAnnotationsProcessor

public AnnotationsProcessor getAnnotationsProcessor()

setTypeToTypeMappingInfo

public void setTypeToTypeMappingInfo(java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typesToTypeMapping)

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference