org.exolab.castor.xml.util.resolvers
Class ByCDR

java.lang.Object
  extended by org.exolab.castor.xml.util.resolvers.AbstractResolverPackageCommand
      extended by org.exolab.castor.xml.util.resolvers.ByCDR
All Implemented Interfaces:
ResolverPackageCommand

public class ByCDR
extends AbstractResolverPackageCommand

Resolves a class by reading the package level class-descriptor-resolver file and loading all descriptors mentioned inside.

Since:
1.2
Version:
$Revision$ $Date$
Author:
Joachim Grueneis, Steven Dolg

Constructor Summary
ByCDR()
          No specific stuff needed.
 
Method Summary
protected  java.util.Map internalResolve(java.lang.String packageName, java.lang.ClassLoader classLoader, java.util.Map properties)
          Tries to load the CDR file for the given package name using the provided class loader.
 
Methods inherited from class org.exolab.castor.xml.util.resolvers.AbstractResolverPackageCommand
isEmptyPackageName, resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByCDR

public ByCDR()
No specific stuff needed.

Method Detail

internalResolve

protected java.util.Map internalResolve(java.lang.String packageName,
                                        java.lang.ClassLoader classLoader,
                                        java.util.Map properties)
                                 throws ResolverException
Tries to load the CDR file for the given package name using the provided class loader. If the CDR file is available and could be loaded properly the descriptors listed in it are added to this cache.
If a descriptor is listed in the CDR file for the given package but could not be loaded (e.g. because the reference class file is not available) the descriptor is ignored but no exception is thrown.
If a CDR file is not available for the given package this method will not load any descriptors and not throw any exceptions.
Further calls to this method with the same package name will not be processed.
The required parameter checks are in the public method and here we expect that the resolve logic itself is implemented.

Specified by:
internalResolve in class AbstractResolverPackageCommand
classLoader - the class loader to use
properties - the resolve properties to use
Returns:
a Map of className and XMLClassDescriptor
Throws:
ResolverException - in case of unrecoverable problems at resolving


Copyright © 2011. All Rights Reserved.