Class CastorXMLStrategy

  • All Implemented Interfaces:
    ResolverStrategy

    public class CastorXMLStrategy
    extends java.lang.Object
    implements ResolverStrategy
    The Castor XML resolver strategy implements the resolving behaviour as it had been implmented before this refactoring step. Meaning that:
    It uses multiple steps to find a class descriptor for a class.
    It uses a cache of class descriptors
    A class that couldn't be resolved once is marked as unresolvable and will not be resolved again - even on a second call.
    Since:
    1.2
    Version:
    $Revision$ $Date$
    Author:
    Joachim Grueneis, Steven Dolg
    • Constructor Detail

      • CastorXMLStrategy

        public CastorXMLStrategy()
        CastorXMLStrategy requires a configuration to be set. Within the constructor the commands building the strategy are instantiated, a command configuration is created and the descriptor cache.
    • Method Detail

      • setProperty

        public void setProperty​(java.lang.String key,
                                java.lang.Object value)
        To set properties for strategy and/or commands.
        Specified by:
        setProperty in interface ResolverStrategy
        Parameters:
        key - name of the property
        value - value the property is set to
      • resolveClass

        public ClassDescriptor resolveClass​(ResolverStrategy.ResolverResults resolverResults,
                                            java.lang.String className)
                                     throws ResolverException
        Implementes a strategy how a class is resolved into a list of class descriptors.
        Specified by:
        resolveClass in interface ResolverStrategy
        Parameters:
        resolverResults - to put the resolver reszlts into
        className - the class to resolve
        Returns:
        the ClassDescriptor for the class or null if the class couldn't be resolved
        Throws:
        ResolverException - in case that resolving fails fatally