|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.guiceyfruit.support.AnnotationMemberProviderSupport<org.springframework.beans.factory.annotation.Autowired>
org.guiceyfruit.spring.support.AutowiredMemberProvider
public class AutowiredMemberProvider
Creates a value for an Autowired
member with an optional Qualifier
annotation
Constructor Summary | |
---|---|
AutowiredMemberProvider(com.google.inject.Injector injector)
|
Method Summary | |
---|---|
protected java.util.Collection |
createCollection(java.lang.Class<?> type)
|
protected java.util.Map |
createMap(java.lang.Class<?> type)
|
protected Predicate<com.google.inject.Binding> |
createQualifierFilter(java.lang.reflect.Member member,
java.lang.annotation.Annotation[] parameterAnnotations)
Returns a new filter on the given member to respect the use of Qualifier annotations or
annotations annotated with Qualifier |
protected java.util.Set<com.google.inject.Binding<?>> |
getSortedBindings(java.lang.Class<?> type,
Predicate<com.google.inject.Binding> filter)
|
boolean |
isNullParameterAllowed(org.springframework.beans.factory.annotation.Autowired annotation,
java.lang.reflect.Method method,
java.lang.Class<?> parameterType,
int parameterIndex)
Returns true if the given parameter on the annotated method can be null |
protected boolean |
isQualified(java.lang.annotation.Annotation annotation)
Returns true if the annotation is a qualified annotation and a valid Guice binding annotation |
protected boolean |
isValidAutowireBinding(com.google.inject.Binding<?> binding)
|
static java.util.List<com.google.inject.Key<?>> |
keys(java.lang.Iterable<com.google.inject.Binding<?>> bindings)
Returns the keys used in the given bindings |
protected java.lang.Object |
provide(org.springframework.beans.factory.annotation.Autowired annotation,
java.lang.reflect.Member member,
com.google.inject.TypeLiteral<?> typeLiteral,
java.lang.Class<?> memberType,
java.lang.annotation.Annotation[] annotations)
The default method to create a value for the named member of the requested type |
protected java.lang.Object |
provideArrayValue(java.lang.reflect.Member member,
com.google.inject.TypeLiteral<?> type,
java.lang.Class<?> memberType,
Predicate<com.google.inject.Binding> filter)
|
protected java.util.Map |
provideMapValues(java.util.Map map,
java.lang.reflect.Member member,
com.google.inject.TypeLiteral<?> type,
Predicate<com.google.inject.Binding> filter)
|
protected java.lang.Object |
provideSingleValue(java.lang.reflect.Member member,
java.lang.Class<?> type,
org.springframework.beans.factory.annotation.Autowired annotation,
Predicate<com.google.inject.Binding> filter)
|
protected java.lang.Object |
tryCreateInstance(java.lang.Class<?> type)
Returns a new instance of the given class if its a public non abstract class which has a public zero argument constructor otherwise returns null |
protected static java.lang.String |
typeName(com.google.inject.Binding<?> bindings)
|
Methods inherited from class org.guiceyfruit.support.AnnotationMemberProviderSupport |
---|
provide, provide |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public AutowiredMemberProvider(com.google.inject.Injector injector)
Method Detail |
---|
public boolean isNullParameterAllowed(org.springframework.beans.factory.annotation.Autowired annotation, java.lang.reflect.Method method, java.lang.Class<?> parameterType, int parameterIndex)
AnnotationMemberProvider
protected java.lang.Object provide(org.springframework.beans.factory.annotation.Autowired annotation, java.lang.reflect.Member member, com.google.inject.TypeLiteral<?> typeLiteral, java.lang.Class<?> memberType, java.lang.annotation.Annotation[] annotations)
AnnotationMemberProviderSupport
provide
in class AnnotationMemberProviderSupport<org.springframework.beans.factory.annotation.Autowired>
protected Predicate<com.google.inject.Binding> createQualifierFilter(java.lang.reflect.Member member, java.lang.annotation.Annotation[] parameterAnnotations)
Qualifier
annotations or
annotations annotated with Qualifier
protected boolean isQualified(java.lang.annotation.Annotation annotation)
protected java.lang.Object provideSingleValue(java.lang.reflect.Member member, java.lang.Class<?> type, org.springframework.beans.factory.annotation.Autowired annotation, Predicate<com.google.inject.Binding> filter)
public static java.util.List<com.google.inject.Key<?>> keys(java.lang.Iterable<com.google.inject.Binding<?>> bindings)
protected java.lang.Object provideArrayValue(java.lang.reflect.Member member, com.google.inject.TypeLiteral<?> type, java.lang.Class<?> memberType, Predicate<com.google.inject.Binding> filter)
protected java.util.Map provideMapValues(java.util.Map map, java.lang.reflect.Member member, com.google.inject.TypeLiteral<?> type, Predicate<com.google.inject.Binding> filter)
protected java.util.Map createMap(java.lang.Class<?> type)
protected java.util.Collection createCollection(java.lang.Class<?> type)
protected java.lang.Object tryCreateInstance(java.lang.Class<?> type)
protected java.util.Set<com.google.inject.Binding<?>> getSortedBindings(java.lang.Class<?> type, Predicate<com.google.inject.Binding> filter)
protected boolean isValidAutowireBinding(com.google.inject.Binding<?> binding)
protected static java.lang.String typeName(com.google.inject.Binding<?> bindings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |