org.jboss.webbeans.injection
Class MethodInjectionPoint<T>
java.lang.Object
org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,S>
org.jboss.webbeans.introspector.ForwardingAnnotatedMember<T,java.lang.reflect.Method>
org.jboss.webbeans.introspector.ForwardingAnnotatedMethod<T>
org.jboss.webbeans.injection.MethodInjectionPoint<T>
- All Implemented Interfaces:
- InjectionPoint, AnnotatedInjectionPoint<T,java.lang.reflect.Method>, AnnotatedItem<T,java.lang.reflect.Method>, AnnotatedMember<T,java.lang.reflect.Method>, AnnotatedMethod<T>
public class MethodInjectionPoint<T>
- extends ForwardingAnnotatedMethod<T>
- implements AnnotatedInjectionPoint<T,java.lang.reflect.Method>
|
Method Summary |
protected AnnotatedMethod<T> |
delegate()
Gets the annotated item |
java.lang.annotation.Annotation[] |
getAnnotations()
|
Bean<?> |
getBean()
|
java.util.Set<java.lang.annotation.Annotation> |
getBindings()
|
java.util.List<ParameterInjectionPoint<?>> |
getParameters()
Gets the abstracted parameters of the method |
protected java.lang.Object[] |
getParameterValues(java.util.List<ParameterInjectionPoint<?>> parameters,
java.lang.Class<? extends java.lang.annotation.Annotation> specialParam,
java.lang.Object specialVal,
ManagerImpl manager,
CreationalContext<?> creationalContext)
Helper method for getting the current parameter values from a list of
annotated parameters. |
void |
inject(java.lang.Object declaringInstance,
java.lang.Object value)
Injects an instance |
T |
invoke(java.lang.Object declaringInstance,
ManagerImpl manager,
CreationalContext<?> creationalContext)
|
T |
invokeWithSpecialValue(java.lang.Object declaringInstance,
java.lang.Class<? extends java.lang.annotation.Annotation> annotatedParameter,
java.lang.Object parameter,
ManagerImpl manager,
CreationalContext<?> creationalContext,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
|
static
|
of(Bean<?> declaringBean,
AnnotatedMethod<T> method)
|
| Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedItem |
equals, getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingTypes, getBindingTypesAsArray, getDeclaredMetaAnnotations, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getType, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem |
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingTypes, getBindingTypesAsArray, getDeclaredMetaAnnotations, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic |
MethodInjectionPoint
protected MethodInjectionPoint(Bean<?> declaringBean,
AnnotatedMethod<T> method)
of
public static <T> MethodInjectionPoint<T> of(Bean<?> declaringBean,
AnnotatedMethod<T> method)
delegate
protected AnnotatedMethod<T> delegate()
- Description copied from class:
ForwardingAnnotatedItem
- Gets the annotated item
- Specified by:
delegate in class ForwardingAnnotatedMethod<T>
- Returns:
- The annotated item
getAnnotations
public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotations in interface InjectionPoint
getBean
public Bean<?> getBean()
- Specified by:
getBean in interface InjectionPoint
getBindings
public java.util.Set<java.lang.annotation.Annotation> getBindings()
- Specified by:
getBindings in interface InjectionPoint
invoke
public T invoke(java.lang.Object declaringInstance,
ManagerImpl manager,
CreationalContext<?> creationalContext)
invokeWithSpecialValue
public T invokeWithSpecialValue(java.lang.Object declaringInstance,
java.lang.Class<? extends java.lang.annotation.Annotation> annotatedParameter,
java.lang.Object parameter,
ManagerImpl manager,
CreationalContext<?> creationalContext,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
getParameters
public java.util.List<ParameterInjectionPoint<?>> getParameters()
- Description copied from interface:
AnnotatedMethod
- Gets the abstracted parameters of the method
- Specified by:
getParameters in interface AnnotatedMethod<T>- Overrides:
getParameters in class ForwardingAnnotatedMethod<T>
- Returns:
- A list of parameters. Returns an empty list if no parameters are
present.
inject
public void inject(java.lang.Object declaringInstance,
java.lang.Object value)
- Description copied from interface:
AnnotatedInjectionPoint
- Injects an instance
- Specified by:
inject in interface AnnotatedInjectionPoint<T,java.lang.reflect.Method>
- Parameters:
declaringInstance - The instance to inject intovalue - The value to inject
getParameterValues
protected java.lang.Object[] getParameterValues(java.util.List<ParameterInjectionPoint<?>> parameters,
java.lang.Class<? extends java.lang.annotation.Annotation> specialParam,
java.lang.Object specialVal,
ManagerImpl manager,
CreationalContext<?> creationalContext)
- Helper method for getting the current parameter values from a list of
annotated parameters.
- Parameters:
parameters - The list of annotated parameter to look upmanager - The Web Beans manager
- Returns:
- The object array of looked up values
Copyright © 2008-2009. All Rights Reserved.