tyrex.resource.castor
Class ResourceMappingLoader
java.lang.Object
org.exolab.castor.mapping.loader.MappingLoader
org.exolab.castor.xml.XMLMappingLoader
tyrex.resource.castor.ResourceMappingLoader
- All Implemented Interfaces:
- org.exolab.castor.mapping.MappingResolver
- public final class ResourceMappingLoader
- extends org.exolab.castor.xml.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
Nested classes inherited from class org.exolab.castor.xml.XMLMappingLoader |
|
Nested classes inherited from class org.exolab.castor.mapping.loader.MappingLoader |
|
Field Summary |
(package private) static org.apache.log4j.Category |
CATEGORY
Logging category |
Fields inherited from class org.exolab.castor.mapping.loader.MappingLoader |
NoDescriptor |
Method Summary |
protected org.exolab.castor.mapping.FieldDescriptor |
createFieldDesc(java.lang.Class javaClass,
org.exolab.castor.mapping.xml.FieldMapping fieldMap)
Creates a single field descriptor. |
org.exolab.castor.mapping.ClassDescriptor |
getDescriptor(java.lang.Class type)
Returns the class descriptor for the specified Java class. |
Methods inherited from class org.exolab.castor.xml.XMLMappingLoader |
createDescriptor, getTypeInfo, resolveRelations |
Methods inherited from class org.exolab.castor.mapping.loader.MappingLoader |
addDescriptor, createFieldDescs, createFieldHandler, findAccessor, getClassLoader, 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 |
CATEGORY
static final org.apache.log4j.Category CATEGORY
- Logging category
ResourceMappingLoader
public ResourceMappingLoader()
throws org.exolab.castor.mapping.MappingException
- Creates the ResourceMappingLoader
getDescriptor
public org.exolab.castor.mapping.ClassDescriptor getDescriptor(java.lang.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
createFieldDesc
protected org.exolab.castor.mapping.FieldDescriptor createFieldDesc(java.lang.Class javaClass,
org.exolab.castor.mapping.xml.FieldMapping fieldMap)
throws org.exolab.castor.mapping.MappingException
- 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
#SpyFieldHandlerImpl
.
- Parameters:
javaClass
- The class to which the field belongsfieldMap
- The field mapping information
- Returns:
- The field descriptor
- Throws:
org.exolab.castor.mapping.MappingException
- The field or its accessor methods are not
found, not accessible, not of the specified type, etc
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2004, Softaris Pty. Ltd. All Rights Reserved.