|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor
public class AnnotationsProcessor
INTERNAL:
Purpose:To perform some initial processing of Java classes and JAXB 2.0 Annotations and generate meta data that can be used by the Mappings Generator and Schema Generator
Responsibilities:
This class does the initial processing of the JAXB 2.0 Generation. It generates meta data that can be used by the later Schema Generation and Mapping Generation steps.
Generator
Constructor Summary | |
---|---|
AnnotationsProcessor(Helper helper)
|
Method Summary | |
---|---|
SchemaTypeInfo |
addClass(JavaClass javaClass)
|
void |
addEnumTypeInfo(JavaClass javaClass,
EnumTypeInfo info)
|
void |
addPackageToNamespaceMapping(java.lang.String packageName,
NamespaceInfo nsInfo)
Add a package name/NamespaceInfo entry to the map. |
void |
addXmlRegistry(java.lang.String factoryClassName,
XmlRegistry xmlReg)
Add an XmlRegistry to ObjectFactory class name pair to the map. |
protected boolean |
areEquals(JavaClass src,
java.lang.Class tgt)
Compares a JavaModel JavaClass to a Class. |
protected boolean |
areEquals(JavaClass src,
java.lang.String tgtCanonicalName)
Compares a JavaModel JavaClass to a Class. |
void |
buildNewTypeInfo(JavaClass[] javaClasses)
Convenience method which class pre and postBuildTypeInfo for a given set of JavaClasses. |
void |
createElementsForTypeMappingInfo()
|
void |
finalizeProperties()
Perform any final generation and/or validation operations on TypeInfo properties. |
java.util.Map<java.lang.String,java.lang.Class> |
getArrayClassesToGeneratedClasses()
|
java.util.Map<java.lang.reflect.Type,java.lang.Class> |
getCollectionClassesToGeneratedClasses()
|
java.util.ArrayList<Property> |
getFieldPropertiesForClass(JavaClass cls,
TypeInfo info,
boolean onlyPublic)
|
java.util.Map<java.lang.Class,JavaClass> |
getGeneratedClassesToArrayClasses()
|
java.util.Map<java.lang.Class,java.lang.reflect.Type> |
getGeneratedClassesToCollectionClasses()
|
java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> |
getGlobalElements()
Lazy load and return the map of global elements. |
java.util.List<ElementDeclaration> |
getLocalElements()
|
java.util.HashMap<java.lang.String,MarshalCallback> |
getMarshalCallbacks()
|
NamespaceInfo |
getNamespaceInfoForPackage(JavaClass javaClass)
|
NamespaceInfo |
getNamespaceInfoForPackage(JavaPackage pack,
java.lang.String packageName)
|
NamespaceResolver |
getNamespaceResolver()
|
java.util.ArrayList |
getNoAccessTypePropertiesForClass(JavaClass cls,
TypeInfo info)
|
java.util.HashMap<java.lang.String,NamespaceInfo> |
getPackageToNamespaceMappings()
|
java.util.ArrayList<Property> |
getPropertiesForClass(JavaClass cls,
TypeInfo info)
|
java.util.HashMap |
getPropertyMapFromArrayList(java.util.ArrayList<Property> props)
|
java.util.ArrayList<Property> |
getPropertyPropertiesForClass(JavaClass cls,
TypeInfo info,
boolean onlyPublic)
|
java.util.ArrayList |
getPublicMemberPropertiesForClass(JavaClass cls,
TypeInfo info)
|
javax.xml.namespace.QName |
getQNameForProperty(java.lang.String defaultName,
JavaHasAnnotations element,
NamespaceInfo namespaceInfo,
java.lang.String uri)
|
javax.xml.namespace.QName |
getSchemaTypeFor(JavaClass javaClass)
|
java.lang.String |
getSchemaTypeNameFor(JavaClass javaClass,
XmlType xmlType)
|
java.lang.String |
getSchemaTypeNameForClassName(java.lang.String className)
|
javax.xml.namespace.QName |
getSchemaTypeOrNullFor(JavaClass javaClass)
|
java.util.HashMap<java.lang.String,TypeInfo> |
getTypeInfo()
|
java.util.ArrayList<JavaClass> |
getTypeInfoClasses()
|
java.util.Map<java.lang.String,TypeInfo> |
getTypeInfosForPackage(java.lang.String packageName)
Convenience method for returning all of the TypeInfo objects for a given package name. |
java.util.Map<TypeMappingInfo,java.lang.Class> |
getTypeMappingInfoToAdapterClasses()
|
java.util.Map<TypeMappingInfo,java.lang.Class> |
getTypeMappingInfoToGeneratedClasses()
|
java.util.Map<TypeMappingInfo,javax.xml.namespace.QName> |
getTypeMappingInfoToSchemaType()
|
java.util.HashMap<java.lang.String,UnmarshalCallback> |
getUnmarshalCallbacks()
|
java.util.HashMap<java.lang.String,javax.xml.namespace.QName> |
getUserDefinedSchemaTypes()
|
boolean |
isCollectionType(JavaClass type)
|
boolean |
isCollectionType(Property field)
|
boolean |
isDefaultNamespaceAllowed()
|
boolean |
isMapType(JavaClass type)
|
JavaClass[] |
postBuildTypeInfo(JavaClass[] javaClasses)
Process any additional classes (i.e. inner classes, @XmlSeeAlso, |
java.util.Map<java.lang.String,TypeInfo> |
preBuildTypeInfo(JavaClass[] javaClasses)
Process class level annotations only. |
void |
processJavaClasses(JavaClass[] classes)
This method was initially designed to handle processing one or more JavaClass instances. |
NamespaceInfo |
processNamespaceInformation(XmlSchema xmlSchema)
|
JavaClass[] |
processObjectFactory(JavaClass objectFactoryClass,
java.util.ArrayList<JavaClass> classes)
|
void |
processSchemaType(java.lang.String name,
java.lang.String namespace,
java.lang.String jClassQualifiedName)
Use name, namespace and type information to setup a user-defined schema type. |
void |
processSchemaType(XmlSchemaType type)
|
void |
setDefaultNamespaceAllowed(boolean isDefaultNamespaceAllowed)
|
void |
setPackageToNamespaceMappings(java.util.HashMap<java.lang.String,NamespaceInfo> packageToNamespaceMappings)
Set namespace override info from XML bindings file. |
boolean |
shouldGenerateTypeInfo(JavaClass javaClass)
|
void |
updateGlobalElements(JavaClass[] classesToProcess)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationsProcessor(Helper helper)
Method Detail |
---|
public void createElementsForTypeMappingInfo()
public java.util.Map<java.lang.String,TypeInfo> preBuildTypeInfo(JavaClass[] javaClasses)
javaClasses
-
public JavaClass[] postBuildTypeInfo(JavaClass[] javaClasses)
javaClasses
-
public void finalizeProperties()
public void processJavaClasses(JavaClass[] classes)
classes
- this paramater can and should be null as it is not usedpublic boolean shouldGenerateTypeInfo(JavaClass javaClass)
public java.util.ArrayList<Property> getPropertiesForClass(JavaClass cls, TypeInfo info)
public java.util.ArrayList<Property> getFieldPropertiesForClass(JavaClass cls, TypeInfo info, boolean onlyPublic)
protected boolean areEquals(JavaClass src, java.lang.Class tgt)
src
- tgt
-
protected boolean areEquals(JavaClass src, java.lang.String tgtCanonicalName)
src
- tgt
-
public java.util.ArrayList<Property> getPropertyPropertiesForClass(JavaClass cls, TypeInfo info, boolean onlyPublic)
public java.util.ArrayList getPublicMemberPropertiesForClass(JavaClass cls, TypeInfo info)
public java.util.HashMap getPropertyMapFromArrayList(java.util.ArrayList<Property> props)
public java.util.ArrayList getNoAccessTypePropertiesForClass(JavaClass cls, TypeInfo info)
public void processSchemaType(java.lang.String name, java.lang.String namespace, java.lang.String jClassQualifiedName)
name
- namespace
- jClassQualifiedName
- public void processSchemaType(XmlSchemaType type)
public void addEnumTypeInfo(JavaClass javaClass, EnumTypeInfo info)
public java.lang.String getSchemaTypeNameForClassName(java.lang.String className)
public javax.xml.namespace.QName getSchemaTypeOrNullFor(JavaClass javaClass)
public javax.xml.namespace.QName getSchemaTypeFor(JavaClass javaClass)
public boolean isCollectionType(Property field)
public boolean isCollectionType(JavaClass type)
public NamespaceInfo processNamespaceInformation(XmlSchema xmlSchema)
public java.util.HashMap<java.lang.String,TypeInfo> getTypeInfo()
public java.util.ArrayList<JavaClass> getTypeInfoClasses()
public java.util.HashMap<java.lang.String,javax.xml.namespace.QName> getUserDefinedSchemaTypes()
public NamespaceResolver getNamespaceResolver()
public java.lang.String getSchemaTypeNameFor(JavaClass javaClass, XmlType xmlType)
public javax.xml.namespace.QName getQNameForProperty(java.lang.String defaultName, JavaHasAnnotations element, NamespaceInfo namespaceInfo, java.lang.String uri)
public java.util.HashMap<java.lang.String,NamespaceInfo> getPackageToNamespaceMappings()
public void addPackageToNamespaceMapping(java.lang.String packageName, NamespaceInfo nsInfo)
public NamespaceInfo getNamespaceInfoForPackage(JavaClass javaClass)
public NamespaceInfo getNamespaceInfoForPackage(JavaPackage pack, java.lang.String packageName)
public java.util.HashMap<java.lang.String,MarshalCallback> getMarshalCallbacks()
public java.util.HashMap<java.lang.String,UnmarshalCallback> getUnmarshalCallbacks()
public JavaClass[] processObjectFactory(JavaClass objectFactoryClass, java.util.ArrayList<JavaClass> classes)
public java.util.HashMap<javax.xml.namespace.QName,ElementDeclaration> getGlobalElements()
public void updateGlobalElements(JavaClass[] classesToProcess)
public boolean isMapType(JavaClass type)
public java.util.Map<java.lang.reflect.Type,java.lang.Class> getCollectionClassesToGeneratedClasses()
public java.util.Map<java.lang.String,java.lang.Class> getArrayClassesToGeneratedClasses()
public java.util.Map<java.lang.Class,java.lang.reflect.Type> getGeneratedClassesToCollectionClasses()
public java.util.Map<java.lang.Class,JavaClass> getGeneratedClassesToArrayClasses()
public java.util.Map<java.lang.String,TypeInfo> getTypeInfosForPackage(java.lang.String packageName)
packageName
-
public void setPackageToNamespaceMappings(java.util.HashMap<java.lang.String,NamespaceInfo> packageToNamespaceMappings)
packageToNamespaceMappings
- public SchemaTypeInfo addClass(JavaClass javaClass)
public void buildNewTypeInfo(JavaClass[] javaClasses)
javaClasses
- public boolean isDefaultNamespaceAllowed()
public java.util.List<ElementDeclaration> getLocalElements()
public java.util.Map<TypeMappingInfo,java.lang.Class> getTypeMappingInfoToGeneratedClasses()
public java.util.Map<TypeMappingInfo,java.lang.Class> getTypeMappingInfoToAdapterClasses()
public void addXmlRegistry(java.lang.String factoryClassName, XmlRegistry xmlReg)
factoryClassName
- ObjectFactory class namexmlReg
- org.eclipse.persistence.jaxb.xmlmodel.XmlRegistry instancepublic java.util.Map<TypeMappingInfo,javax.xml.namespace.QName> getTypeMappingInfoToSchemaType()
public void setDefaultNamespaceAllowed(boolean isDefaultNamespaceAllowed)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |