com.dyuproject.ioc
Class DefaultResolver

java.lang.Object
  extended by com.dyuproject.ioc.ResolverCollection
      extended by com.dyuproject.ioc.DefaultResolver
All Implemented Interfaces:
Resource.Resolver

public class DefaultResolver
extends ResolverCollection

The default resolver which delegates the resolution to FileResolver, URLResolver and ClasspathResolver.

Author:
David Yu
Date created:
Feb 23, 2009

Field Summary
static DefaultResolver DEFAULT
          The default instance
static String TYPE
          The type of this resolver.
 
Fields inherited from class com.dyuproject.ioc.ResolverCollection
_resolvers, _type
 
Method Summary
 Resource createResource(String path)
          Creates a resource from a given path string.
static DefaultResolver getDefault()
          Gets the default instance.
static void putDefaultResolvers(Map<String,Resource.Resolver> resolvers)
          Puts the FileResolver, URLResolver and ClasspathResolver on the given map.
protected  void resolveDefault(Resource resource, Context context)
           
 
Methods inherited from class com.dyuproject.ioc.ResolverCollection
getResolver, getType, putResolver, resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
The type of this resolver. ("default")


DEFAULT

public static DefaultResolver DEFAULT
The default instance

Method Detail

getDefault

public static DefaultResolver getDefault()
Gets the default instance.


putDefaultResolvers

public static void putDefaultResolvers(Map<String,Resource.Resolver> resolvers)
Puts the FileResolver, URLResolver and ClasspathResolver on the given map.


resolveDefault

protected void resolveDefault(Resource resource,
                              Context context)
                       throws IOException
Overrides:
resolveDefault in class ResolverCollection
Throws:
IOException

createResource

public Resource createResource(String path)
                        throws IOException
Description copied from interface: Resource.Resolver
Creates a resource from a given path string.

Specified by:
createResource in interface Resource.Resolver
Overrides:
createResource in class ResolverCollection
Throws:
IOException


Copyright © 2008-2013. All Rights Reserved.