|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.mapping.loader.MappingLoader
org.exolab.castor.xml.XMLMappingLoader
public class XMLMappingLoader
An XML implementation of mapping helper. Creates XML class descriptors from the mapping file.
Nested Class Summary | |
---|---|
(package private) class |
XMLMappingLoader.ContainerElementFieldDescriptor
An extended XMLFieldDescriptor that allows us to change the fieldType, needed for container element support |
(package private) class |
XMLMappingLoader.IdentityConvertor
A special TypeConvertor that simply returns the object given. |
Nested classes/interfaces inherited from class org.exolab.castor.mapping.loader.MappingLoader |
---|
MappingLoader.TypeInfoReference |
Field Summary |
---|
Fields inherited from class org.exolab.castor.mapping.loader.MappingLoader |
---|
NoDescriptor |
Constructor Summary | |
---|---|
XMLMappingLoader(java.lang.ClassLoader loader,
java.io.PrintWriter logWriter)
Creates a new XMLMappingLoader |
Method Summary | |
---|---|
protected ClassDescriptor |
createDescriptor(ClassMapping clsMap)
Creates a new descriptor. |
protected FieldDescriptor |
createFieldDesc(java.lang.Class javaClass,
FieldMapping fieldMap)
Creates a single field descriptor. |
protected TypeInfo |
getTypeInfo(java.lang.Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap)
|
protected static boolean |
isPrimitive(java.lang.Class type)
Returns true if the given class should be treated as a primitive type |
protected void |
resolveRelations(ClassDescriptor clsDesc)
|
void |
setLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files). |
Methods inherited from class org.exolab.castor.mapping.loader.MappingLoader |
---|
addDescriptor, createFieldDescs, createFieldHandler, findAccessor, getClassLoader, getDescriptor, getDescriptor, getLogWriter, listDescriptors, listJavaClasses, loadClassDescriptor, loadMapping, resolveType, setAllowRedefinitions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLMappingLoader(java.lang.ClassLoader loader, java.io.PrintWriter logWriter) throws MappingException
MappingException
Method Detail |
---|
protected void resolveRelations(ClassDescriptor clsDesc) throws MappingException
resolveRelations
in class MappingLoader
MappingException
protected ClassDescriptor createDescriptor(ClassMapping clsMap) throws MappingException
MappingLoader
ClassDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
createDescriptor
in class MappingLoader
clsMap
- The class mapping information
MappingException
- An exception indicating why mapping for
the class cannot be createdprotected FieldDescriptor createFieldDesc(java.lang.Class javaClass, FieldMapping fieldMap) throws MappingException
MappingLoader
FieldDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
createFieldDesc
in class MappingLoader
javaClass
- The class to which the field belongsfieldMap
- The field mapping information
MappingException
- The field or its accessor methods are not
found, not accessible, not of the specified type, etcpublic void setLoadPackageMappings(boolean loadPackageMappings)
loadPackageMappings
- a boolean that enables or
disables the loading of package specific mapping filesprotected TypeInfo getTypeInfo(java.lang.Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException
getTypeInfo
in class MappingLoader
MappingException
protected static boolean isPrimitive(java.lang.Class type)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |