org.glassfish.jersey.server.internal.inject
Class ParamInjectionResolver<A extends java.lang.annotation.Annotation>

java.lang.Object
  extended by com.sun.hk2.component.InjectionResolver<A>
      extended by org.glassfish.jersey.server.internal.inject.ParamInjectionResolver<A>
Type Parameters:
A - supported parameter injection annotation.
All Implemented Interfaces:
com.sun.hk2.component.InjectionResolverQuery

public abstract class ParamInjectionResolver<A extends java.lang.annotation.Annotation>
extends com.sun.hk2.component.InjectionResolver<A>

Abstract base class for resolving JAX-RS @XxxParam injection.

Author:
Marek Potociar (marek.potociar at oracle.com)

Field Summary
 
Fields inherited from class com.sun.hk2.component.InjectionResolver
type
 
Constructor Summary
ParamInjectionResolver(java.lang.Class<A> injectionAnnotationClass, java.lang.Class<? extends AbstractValueFactoryProvider<A>> valueFactoryProviderClass)
          Initialize the base parameter injection resolver.
 
Method Summary
<V> V
getValue(java.lang.Object component, org.jvnet.hk2.component.Inhabitant<?> onBehalfOf, java.lang.reflect.AnnotatedElement annotated, java.lang.reflect.Type genericType, java.lang.Class<V> type)
           
 boolean isOptional(java.lang.reflect.AnnotatedElement annotated, A annotation)
           
 
Methods inherited from class com.sun.hk2.component.InjectionResolver
getSetterMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamInjectionResolver

public ParamInjectionResolver(java.lang.Class<A> injectionAnnotationClass,
                              java.lang.Class<? extends AbstractValueFactoryProvider<A>> valueFactoryProviderClass)
Initialize the base parameter injection resolver.

Parameters:
injectionAnnotationClass - parameter injection annotation class.
valueFactoryProviderClass - parameter value factory provider class.
Method Detail

isOptional

public boolean isOptional(java.lang.reflect.AnnotatedElement annotated,
                          A annotation)
Overrides:
isOptional in class com.sun.hk2.component.InjectionResolver<A extends java.lang.annotation.Annotation>

getValue

public <V> V getValue(java.lang.Object component,
                      org.jvnet.hk2.component.Inhabitant<?> onBehalfOf,
                      java.lang.reflect.AnnotatedElement annotated,
                      java.lang.reflect.Type genericType,
                      java.lang.Class<V> type)
           throws org.jvnet.hk2.component.ComponentException
Throws:
org.jvnet.hk2.component.ComponentException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.