Class ByDescriptorClass
java.lang.Object
org.exolab.castor.xml.util.resolvers.AbstractResolverClassCommand
org.exolab.castor.xml.util.resolvers.ByDescriptorClass
- All Implemented Interfaces:
ResolverClassCommand
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).
- Since:
- 1.2
- Version:
- $Revision$ $Date$
- Author:
- Joachim Grueneis, Steven Dolg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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 nameclassName
+ "Descriptor", and contain a valid XMLClassDescriptor.
If a descriptor is found it is added to the internal descriptor cache.
The required parameter checks are in the public method and here we expect that the resolve logic itself is implemented.- Specified by:
internalResolve
in classAbstractResolverClassCommand
- Parameters:
className
- the name of the class to resolveclassLoader
- the class loader to useproperties
- the resolve properties to use- Returns:
- a Map of className and XMLClassDescriptor
- Throws:
ResolverException
- if unrecoverable problems in resolve occured
-