org.exolab.castor.xml

Class XMLMappingLoader

public class XMLMappingLoader extends MappingLoader

An XML implementation of mapping helper. Creates XML class descriptors from the mapping file.

Version: $Revision: 1.15 $ $Date: 2005/08/03 21:11:48 $

Author: Keith Visco Assaf Arkin

Nested Class Summary
classXMLMappingLoader.ContainerElementFieldDescriptor
An extended XMLFieldDescriptor that allows us to change the fieldType, needed for container element support
classXMLMappingLoader.IdentityConvertor
A special TypeConvertor that simply returns the object given.
Constructor Summary
XMLMappingLoader(ClassLoader loader, PrintWriter logWriter)
Creates a new XMLMappingLoader
Method Summary
protected ClassDescriptorcreateDescriptor(ClassMapping clsMap)
protected FieldDescriptorcreateFieldDesc(Class javaClass, FieldMapping fieldMap)
protected TypeInfogetTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)
protected static booleanisPrimitive(Class type)
Returns true if the given class should be treated as a primitive type
protected voidresolveRelations(ClassDescriptor clsDesc)
voidsetLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files).

Constructor Detail

XMLMappingLoader

public XMLMappingLoader(ClassLoader loader, PrintWriter logWriter)
Creates a new XMLMappingLoader

Method Detail

createDescriptor

protected ClassDescriptor createDescriptor(ClassMapping clsMap)

createFieldDesc

protected FieldDescriptor createFieldDesc(Class javaClass, FieldMapping fieldMap)

getTypeInfo

protected TypeInfo getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)

isPrimitive

protected static boolean isPrimitive(Class type)
Returns true if the given class should be treated as a primitive type

Returns: true if the given class should be treated as a primitive type

resolveRelations

protected void resolveRelations(ClassDescriptor clsDesc)

setLoadPackageMappings

public void setLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files).

Parameters: loadPackageMappings a boolean that enables or disables the loading of package specific mapping files

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com