Class AbstractResolverPackageCommand
java.lang.Object
org.exolab.castor.xml.util.resolvers.AbstractResolverPackageCommand
- All Implemented Interfaces:
ResolverPackageCommand
- Direct Known Subclasses:
ByCDR
,ByPackageMapping
public abstract class AbstractResolverPackageCommand
extends Object
implements ResolverPackageCommand
The abstract resolver command provides the argument checking, writes a debug
message and reads the class loader from the properties... All specific code
is found in the extended classes.
- Since:
- 1.2
- Version:
- $Id$
- Author:
- Joachim Grueneis, jgrueneis AT gmail DOT com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Map<String,
ClassDescriptor> internalResolve
(String packageName, ClassLoader classLoader, Map props) The required parameter checks are in the public method and here we expect that the resolve logic itself is implemented.protected final boolean
isEmptyPackageName
(String packageName) Is the given package name empty?final Map<String,
ClassDescriptor> The one and only purpose resolver commands are good for ;-) .
-
Constructor Details
-
AbstractResolverPackageCommand
public AbstractResolverPackageCommand()
-
-
Method Details
-
resolve
public final Map<String,ClassDescriptor> resolve(String packageName, Map properties) throws ResolverException The one and only purpose resolver commands are good for ;-) . Resolving the package giving and returning (a maybe empty) list of descriptors found. The descriptors are put into a Map of String (className) and Class (descriptor class).- Specified by:
resolve
in interfaceResolverPackageCommand
- Parameters:
packageName
- the name of the package to resolveproperties
- the Properties to be used at resolve- Returns:
- a Map of className and XMLClassDescriptor
- Throws:
ResolverException
- in case that resolving fails fatally
-
isEmptyPackageName
Is the given package name empty?- Parameters:
packageName
- the package name to check- Returns:
- true if the String is empty
-
internalResolve
protected abstract Map<String,ClassDescriptor> internalResolve(String packageName, ClassLoader classLoader, Map props) throws ResolverException The required parameter checks are in the public method and here we expect that the resolve logic itself is implemented.- Parameters:
className
- the name of the class to resolveclassLoader
- the class loader to useprops
- the resolve properties to use- Returns:
- a Map of className and XMLClassDescriptor
- Throws:
ResolverException
- in case of unrecoverable problems at resolving
-