com.sun.jersey.spi.resource
Class ResourceConstructor

java.lang.Object
  extended by com.sun.jersey.spi.service.ComponentConstructor
      extended by com.sun.jersey.spi.resource.ResourceConstructor

public class ResourceConstructor
extends ComponentConstructor

A utility class to obtain the most suitable constructor for a resource class.

Author:
Paul.Sandoz@Sun.Com

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jersey.spi.service.ComponentConstructor
ComponentConstructor.ConstructorComparator<T>, ComponentConstructor.ConstructorInjectablePair<T>
 
Field Summary
 
Fields inherited from class com.sun.jersey.spi.service.ComponentConstructor
ipc
 
Constructor Summary
ResourceConstructor(InjectableProviderContext ipc)
           
 
Method Summary
<T> ComponentConstructor.ConstructorInjectablePair<T>
getConstructor(java.lang.Class<T> c, AbstractResource ar, ComponentProvider.Scope s)
          Get the most suitable constructor.
 
Methods inherited from class com.sun.jersey.spi.service.ComponentConstructor
getConstructor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceConstructor

public ResourceConstructor(InjectableProviderContext ipc)
Method Detail

getConstructor

public <T> ComponentConstructor.ConstructorInjectablePair<T> getConstructor(java.lang.Class<T> c,
                                                                            AbstractResource ar,
                                                                            ComponentProvider.Scope s)
Get the most suitable constructor. The constructor with the most parameters and that has the most parameters associated with Injectable instances will be chosen.

Type Parameters:
T - the type of the resource.
Parameters:
c - the class to instantiate.
ar - the abstract resource.
s - the scope for which the injectables will be used.
Returns:
a list constructor and list of injectables for the constructor parameters.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.