org.guiceyfruit.jsr250
Class ResourceMemberProvider
java.lang.Object
org.guiceyfruit.support.AnnotationMemberProviderSupport<javax.annotation.Resource>
org.guiceyfruit.jsr250.ResourceMemberProvider
- All Implemented Interfaces:
- AnnotationMemberProvider<javax.annotation.Resource>
public class ResourceMemberProvider
- extends AnnotationMemberProviderSupport<javax.annotation.Resource>
Injects fields or methods with the results of the Resource
annotation
- Version:
- $Revision: 1.1 $
Method Summary |
javax.naming.Context |
getContext()
|
boolean |
isNullParameterAllowed(javax.annotation.Resource 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 java.lang.Object |
provide(javax.annotation.Resource resource,
java.lang.reflect.Member member,
com.google.inject.TypeLiteral<?> requiredType,
java.lang.Class<?> memberType,
java.lang.annotation.Annotation[] annotations)
The default method to create a value for the named member of the requested type |
void |
setContext(javax.naming.Context context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceMemberProvider
@Inject
public ResourceMemberProvider(com.google.inject.Injector injector)
getContext
public javax.naming.Context getContext()
setContext
@Inject(optional=true)
public void setContext(javax.naming.Context context)
isNullParameterAllowed
public boolean isNullParameterAllowed(javax.annotation.Resource annotation,
java.lang.reflect.Method method,
java.lang.Class<?> parameterType,
int parameterIndex)
- Description copied from interface:
AnnotationMemberProvider
- Returns true if the given parameter on the annotated method can be null
provide
protected java.lang.Object provide(javax.annotation.Resource resource,
java.lang.reflect.Member member,
com.google.inject.TypeLiteral<?> requiredType,
java.lang.Class<?> memberType,
java.lang.annotation.Annotation[] annotations)
- Description copied from class:
AnnotationMemberProviderSupport
- The default method to create a value for the named member of the requested type
- Specified by:
provide
in class AnnotationMemberProviderSupport<javax.annotation.Resource>
Copyright © 2009. All Rights Reserved.