java.lang.Object
org.eclipse.persistence.jaxb.compiler.Generator
INTERNAL:
Purpose:The purpose of this class is to act as an entry point into the TopLink JAXB 2.0 Generation framework
Responsibilities:
- Run initial processing on a list of classes to create TypeInfo meta data
- Provide API to generate Schema Files
- Provide API to generate a TopLink Project
- Act as an integration point with WebServices
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.
- Since:
- Oracle TopLink 11.1.1.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionGenerator
(JavaModelInput jModelInput) This constructor creates a Helper using the JavaModelInput instance's JavaModel.Generator
(JavaModelInput jModelInput, Map<String, XmlBindings> xmlBindings, ClassLoader cLoader, String defaultTargetNamespace, boolean enableXmlAccessorFactory) This constructor will process and apply the given XmlBindings as appropriate.Generator
(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, Map<Type, TypeMappingInfo> typeToTypeMappingInfo, String defaultTargetNamespace) This constructor creates a Helper using the JavaModelInput instance's JavaModel and a map of javaclasses that were generated from Type objects.Generator
(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, Map<Type, TypeMappingInfo> typeToTypeMappingInfo, Map<String, XmlBindings> xmlBindings, ClassLoader cLoader, String defaultTargetNamespace, boolean enableXmlAccessorFactory) This constructor will process and apply the given XmlBindings as appropriate. -
Method Summary
Modifier and TypeMethodDescriptiongenerateSchemaFiles
(SchemaOutputResolver outputResolver, Map<QName, Type> additionalGlobalElements) generateSchemaFiles
(String schemaPath, Map<QName, Type> additionalGlobalElements) boolean
boolean
void
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
(Map<Type, TypeMappingInfo> typesToTypeMapping)
-
Constructor Details
-
Generator
This constructor creates a Helper using the JavaModelInput instance's JavaModel. Annotations are processed here as well. -
Generator
public Generator(JavaModelInput jModelInput, Map<String, XmlBindings> xmlBindings, ClassLoader cLoader, String defaultTargetNamespace, boolean enableXmlAccessorFactory) 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:
xmlBindings
- map of XmlBindings keyed on package name
-
Generator
public Generator(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, Map<Type, TypeMappingInfo> typeToTypeMappingInfo, 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. -
Generator
public Generator(JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] javaClasses, Map<Type, TypeMappingInfo> typeToTypeMappingInfo, Map<String, XmlBindings> xmlBindings, ClassLoader cLoader, String defaultTargetNamespace, boolean enableXmlAccessorFactory) 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:
xmlBindings
- map of XmlBindings keyed on package name
-
-
Method Details
-
postInitialize
public 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). -
hasMarshalCallbacks
public boolean hasMarshalCallbacks() -
hasUnmarshalCallbacks
public boolean hasUnmarshalCallbacks() -
generateProject
- Throws:
Exception
-
generateSchema
-
generateSchemaFiles
public Map<String,SchemaTypeInfo> generateSchemaFiles(String schemaPath, Map<QName, Type> additionalGlobalElements) throws FileNotFoundException- Throws:
FileNotFoundException
-
generateSchemaFiles
public Map<String,SchemaTypeInfo> generateSchemaFiles(SchemaOutputResolver outputResolver, Map<QName, Type> additionalGlobalElements) -
getUnmarshalCallbacks
-
getMarshalCallbacks
-
getMappingsGenerator
-
getAnnotationsProcessor
-
setTypeToTypeMappingInfo
-
getTypeToTypeMappingInfo
-