Class AbstractResolverPackageCommand

  • All Implemented Interfaces:
    ResolverPackageCommand
    Direct Known Subclasses:
    ByCDR, ByPackageMapping

    public abstract class AbstractResolverPackageCommand
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.util.Map<java.lang.String,​ClassDescriptor> internalResolve​(java.lang.String packageName, java.lang.ClassLoader classLoader, java.util.Map props)
      The required parameter checks are in the public method and here we expect that the resolve logic itself is implemented.
      protected boolean isEmptyPackageName​(java.lang.String packageName)
      Is the given package name empty?
      java.util.Map<java.lang.String,​ClassDescriptor> resolve​(java.lang.String packageName, java.util.Map properties)
      The one and only purpose resolver commands are good for ;-) .
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractResolverPackageCommand

        public AbstractResolverPackageCommand()
    • Method Detail

      • resolve

        public final java.util.Map<java.lang.String,​ClassDescriptor> resolve​(java.lang.String packageName,
                                                                                   java.util.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 interface ResolverPackageCommand
        Parameters:
        packageName - the name of the package to resolve
        properties - the Properties to be used at resolve
        Returns:
        a Map of className and XMLClassDescriptor
        Throws:
        ResolverException - in case that resolving fails fatally
      • isEmptyPackageName

        protected final boolean isEmptyPackageName​(java.lang.String packageName)
        Is the given package name empty?
        Parameters:
        packageName - the package name to check
        Returns:
        true if the String is empty
      • internalResolve

        protected abstract java.util.Map<java.lang.String,​ClassDescriptor> internalResolve​(java.lang.String packageName,
                                                                                                 java.lang.ClassLoader classLoader,
                                                                                                 java.util.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 resolve
        classLoader - the class loader to use
        props - the resolve properties to use
        Returns:
        a Map of className and XMLClassDescriptor
        Throws:
        ResolverException - in case of unrecoverable problems at resolving