public class Generator
extends java.lang.Object
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.
AnnotationsProcessor
,
MappingsGenerator
,
SchemaGenerator
Constructor and Description |
---|
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,
boolean enableXmlAccessorFactory)
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,
boolean enableXmlAccessorFactory)
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.
|
Modifier and Type | Method and Description |
---|---|
CoreProject |
generateProject() |
java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> |
generateSchema() |
java.util.Map<java.lang.String,SchemaTypeInfo> |
generateSchemaFiles(SchemaOutputResolver outputResolver,
java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements) |
java.util.Map<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.Map |
getMarshalCallbacks() |
java.util.Map<java.lang.reflect.Type,TypeMappingInfo> |
getTypeToTypeMappingInfo() |
java.util.Map |
getUnmarshalCallbacks() |
boolean |
hasMarshalCallbacks() |
boolean |
hasUnmarshalCallbacks() |
void |
postInitialize()
This event is called when mappings generation is completed,
and provides a chance to deference anything that is no longer
needed (to reduce the memory footprint of this object).
|
void |
setTypeToTypeMappingInfo(java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typesToTypeMapping) |
public Generator(JavaModelInput jModelInput)
jModelInput
- public Generator(JavaModelInput jModelInput, java.util.Map<java.lang.String,XmlBindings> xmlBindings, java.lang.ClassLoader cLoader, java.lang.String defaultTargetNamespace, boolean enableXmlAccessorFactory)
jModelInput
- xmlBindings
- map of XmlBindings keyed on package namecLoader
- public Generator(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typeToTypeMappingInfo, java.lang.String defaultTargetNamespace)
jModelInput
- 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, boolean enableXmlAccessorFactory)
jModelInput
- defaultTargetNamespace
- enableXmlAccessorFactory
- javaClasses
- typeMappingInfos
- typeToTypeMappingInfo
- xmlBindings
- map of XmlBindings keyed on package namecLoader
- public void postInitialize()
public boolean hasMarshalCallbacks()
public boolean hasUnmarshalCallbacks()
public CoreProject generateProject() throws java.lang.Exception
java.lang.Exception
public java.util.Collection<org.eclipse.persistence.internal.oxm.schema.model.Schema> generateSchema()
public java.util.Map<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
java.io.FileNotFoundException
public java.util.Map<java.lang.String,SchemaTypeInfo> generateSchemaFiles(SchemaOutputResolver outputResolver, java.util.Map<javax.xml.namespace.QName,java.lang.reflect.Type> additionalGlobalElements)
public java.util.Map getUnmarshalCallbacks()
public java.util.Map getMarshalCallbacks()
public MappingsGenerator getMappingsGenerator()
public AnnotationsProcessor getAnnotationsProcessor()
public void setTypeToTypeMappingInfo(java.util.Map<java.lang.reflect.Type,TypeMappingInfo> typesToTypeMapping)
public java.util.Map<java.lang.reflect.Type,TypeMappingInfo> getTypeToTypeMappingInfo()