|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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)
|
|
AnnotationsProcessor(Helper helper,
java.util.Map<JavaClass,java.lang.reflect.Type> javaClassToType)
|
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. |
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 |
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.HashMap<java.lang.String,MarshalCallback> |
getMarshalCallbacks()
|
NamespaceInfo |
getNamespaceInfoForPackage(JavaClass javaClass)
|
NamespaceInfo |
getNamespaceInfoForPackage(JavaPackage pack)
|
NamespaceInfo |
getNamespaceInfoForPackage(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.HashMap<java.lang.String,UnmarshalCallback> |
getUnmarshalCallbacks()
|
java.util.HashMap<java.lang.String,javax.xml.namespace.QName> |
getUserDefinedSchemaTypes()
|
void |
init()
Initialize maps, lists, etc. |
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, @XmlRegisrty, etc.) |
java.util.Map<java.lang.String,TypeInfo> |
preBuildTypeInfo(JavaClass[] javaClasses)
Process class level annotations only. |
void |
processClassesAndProperties(JavaClass[] classes)
Generate TypeInfo instances for a given array of JavaClasses. |
void |
processJavaClasses(JavaClass[] classes)
Process a given set of JavaClass instances. |
NamespaceInfo |
processNamespaceInformation(XmlSchema xmlSchema)
|
JavaClass[] |
processObjectFactory(JavaClass objectFactoryClass,
java.util.ArrayList<JavaClass> classes)
|
void |
processSchemaType(XmlSchemaType type)
|
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)
public AnnotationsProcessor(Helper helper, java.util.Map<JavaClass,java.lang.reflect.Type> javaClassToType)
Method Detail |
---|
public void processClassesAndProperties(JavaClass[] classes)
classes
- public void init()
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
- public 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(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)
public NamespaceInfo getNamespaceInfoForPackage(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()
|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |