tyrex.resource.castor

Class ResourceMappingLoader

public final class ResourceMappingLoader extends XMLMappingLoader

Implementation of org.exolab.castor.xml.XMLMappingLoader that overrides the class descriptor for non tyrex and java classes.

This class is not thread-safe.

Author: Riad Mohammed

Field Summary
static CategoryCATEGORY
Logging category
Constructor Summary
ResourceMappingLoader()
Creates the ResourceMappingLoader
Method Summary
protected FieldDescriptorcreateFieldDesc(Class javaClass, FieldMapping fieldMap)
Creates a single field descriptor.
ClassDescriptorgetDescriptor(Class type)
Returns the class descriptor for the specified Java class.

Field Detail

CATEGORY

static final Category CATEGORY
Logging category

Constructor Detail

ResourceMappingLoader

public ResourceMappingLoader()
Creates the ResourceMappingLoader

Method Detail

createFieldDesc

protected FieldDescriptor createFieldDesc(Class javaClass, FieldMapping fieldMap)
Creates a single field descriptor. The field mapping is used to create a new stock FieldDescriptor.

If the java class is a subclass of ResourceConfig then the field handler of the default field descriptor is overridden with ResourceMappingLoader.

Parameters: javaClass The class to which the field belongs fieldMap The field mapping information

Returns: The field descriptor

Throws: MappingException The field or its accessor methods are not found, not accessible, not of the specified type, etc

getDescriptor

public ClassDescriptor getDescriptor(Class type)
Returns the class descriptor for the specified Java class. In no such descriptor exists, returns null.

If the type comes from an object created by a field whose type is ResourceConfig then a special class descriptor is created and returned.

Parameters: type The Java class

Returns: A suitable class descriptor or null

Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.