com.sun.hk2.component
Class InjectionResolver<U extends Annotation>

java.lang.Object
  extended by com.sun.hk2.component.InjectionResolver<U>
Type Parameters:
U - U is the annotation used to identify the injection targets.
All Implemented Interfaces:
InjectionResolverQuery
Direct Known Subclasses:
InjectInjectionResolver

Deprecated.

@Deprecated
public abstract class InjectionResolver<U extends Annotation>
extends Object
implements InjectionResolverQuery

Implementation of this abstract class are handling injection resolution for a particular injection annotation Inject Injection targets are identified by the generic parameter and the constructor of this class. Potential injection targets are fields and methods of the injected type.

Author:
Jerome Dochez

Field Summary
 Class<U> type
          Deprecated.  
 
Constructor Summary
InjectionResolver(Class<U> type)
          Deprecated. Construct a resolver with a particular injection type
 
Method Summary
 Method getSetterMethod(Method annotated, U annotation)
          Deprecated. Returns the setter method responsible for setting the resource identified by the passed annotation on the passed annotated method.
 boolean isOptional(AnnotatedElement annotated, U annotation)
          Deprecated. Returns true if the resolution of this injection identified by the passed annotation instance is optional
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.hk2.component.InjectionResolverQuery
getValue
 

Field Detail

type

public final Class<U extends Annotation> type
Deprecated. 
Constructor Detail

InjectionResolver

public InjectionResolver(Class<U> type)
Deprecated. 
Construct a resolver with a particular injection type

Parameters:
type - the injection annotation type
Method Detail

getSetterMethod

public Method getSetterMethod(Method annotated,
                              U annotation)
Deprecated. 
Returns the setter method responsible for setting the resource identified by the passed annotation on the passed annotated method. This is useful when the annotation is specified on the getter for instance (due to external specification requirements for instance) while the setter should be used if values must be set using this injection resolver. By default, the setter method is the annotated method.

Parameters:
annotated - is the annotated Method
annotation - the annotation on the method
Returns:
the setter method to use for injecting the annotation identified resource

isOptional

public boolean isOptional(AnnotatedElement annotated,
                          U annotation)
Deprecated. 
Returns true if the resolution of this injection identified by the passed annotation instance is optional

Parameters:
annotated - is the annotated java element Method or Field
annotation - the injection metadata
Returns:
true if the getValue() can return null without generating a faulty injection operation


Copyright © 2013 Oracle Corporation. All Rights Reserved.