org.exolab.castor.xml.util.resolvers

Class ByDescriptorClass

Implemented Interfaces:
ResolverClassCommand

public class ByDescriptorClass
extends AbstractResolverClassCommand

Resolve a class by looking for a descriptor class 'nearby'. The descriptor class has to follow some specific naming conventions (and maybe be in a special package).
Version:
$Revision$ $Date$
Authors:
Joachim Grueneis
Steven Dolg
Since:
1.2

Constructor Summary

ByDescriptorClass()
No specific stuff needed.

Method Summary

protected Map
internalResolve(String className, ClassLoader classLoader, Map properties)
Tries to load an XMLClassDescriptor directly from an existing .class file.

Methods inherited from class org.exolab.castor.xml.util.resolvers.AbstractResolverClassCommand

internalResolve, resolve

Constructor Details

ByDescriptorClass

public ByDescriptorClass()
No specific stuff needed.

Method Details

internalResolve

protected Map internalResolve(String className,
                              ClassLoader classLoader,
                              Map properties)
            throws ResolverException
Tries to load an XMLClassDescriptor directly from an existing .class file.
The file that is searched for must be located in the classpath, have the name className + "Descriptor", and contain a valid XMLClassDescriptor.
If a descriptor is found it is added to the internal descriptor cache.
Overrides:
internalResolve in interface AbstractResolverClassCommand

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