org.restlet.ext.guice
Interface FinderFactory

All Known Implementing Classes:
RestletGuice.Module

public interface FinderFactory

Factory for dependency-injecting Finders.

Author:
Tim Peierls

Method Summary
 Finder finder(Class<?> cls)
          Returns a Finder that will obtain a dependency-injected instance of the ServerResource subtype bound to the type associated with the given class.
 Finder finder(Class<?> cls, Class<? extends Annotation> qualifier)
          Returns a Finder that will obtain a dependency-injected instance of the ServerResource subtype bound to the type and qualifier associated with the given class.
 

Method Detail

finder

Finder finder(Class<?> cls)
Returns a Finder that will obtain a dependency-injected instance of the ServerResource subtype bound to the type associated with the given class.

Parameters:
cls - The class to instantiate.
Returns:
An instance of Finder.
Throws:
com.google.inject.ProvisionException - if cls is not bound to ServerResource or a subclass.

finder

Finder finder(Class<?> cls,
              Class<? extends Annotation> qualifier)
Returns a Finder that will obtain a dependency-injected instance of the ServerResource subtype bound to the type and qualifier associated with the given class.

Parameters:
cls - The class to instantiate.
qualifier - The qualifier associated with the given class.
Returns:
An instance of Finder.
Throws:
com.google.inject.ProvisionException - if cls qualified by qualifier is not bound to ServerResource or a subclass.


Copyright © 2005-2014 Restlet.