org.apache.camel.guice.support
Class AnnotationMemberProviderSupport<A extends Annotation>

java.lang.Object
  extended by org.apache.camel.guice.support.AnnotationMemberProviderSupport<A>
All Implemented Interfaces:
AnnotationMemberProvider<A>
Direct Known Subclasses:
NamedProviderSupport

public abstract class AnnotationMemberProviderSupport<A extends Annotation>
extends Object
implements AnnotationMemberProvider<A>

A useful base class for implementors meaning they only have to implement a single method whether a Field or Method parameter is being injected

Version:

Constructor Summary
AnnotationMemberProviderSupport()
           
 
Method Summary
protected abstract  Object provide(A annotation, Member member, com.google.inject.TypeLiteral<?> requiredType, Class<?> memberType, Annotation[] annotations)
          The default method to create a value for the named member of the requested type
 Object provide(A annotation, com.google.inject.TypeLiteral<?> type, Field field)
          Returns the value to be injected for the given annotated field
 Object provide(A annotation, com.google.inject.TypeLiteral<?> type, Method method, Class<?> parameterType, int parameterIndex)
          Returns the value to be injected for the given annotated method parameter value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.guice.support.AnnotationMemberProvider
isNullParameterAllowed
 

Constructor Detail

AnnotationMemberProviderSupport

public AnnotationMemberProviderSupport()
Method Detail

provide

public Object provide(A annotation,
                      com.google.inject.TypeLiteral<?> type,
                      Field field)
Description copied from interface: AnnotationMemberProvider
Returns the value to be injected for the given annotated field

Specified by:
provide in interface AnnotationMemberProvider<A extends Annotation>

provide

public Object provide(A annotation,
                      com.google.inject.TypeLiteral<?> type,
                      Method method,
                      Class<?> parameterType,
                      int parameterIndex)
Description copied from interface: AnnotationMemberProvider
Returns the value to be injected for the given annotated method parameter value

Specified by:
provide in interface AnnotationMemberProvider<A extends Annotation>

provide

protected abstract Object provide(A annotation,
                                  Member member,
                                  com.google.inject.TypeLiteral<?> requiredType,
                                  Class<?> memberType,
                                  Annotation[] annotations)
The default method to create a value for the named member of the requested type



Apache Camel