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()
Get the annotations of the field in the case of field injection, or
annotations of the parameter in the case of method parameter or
constructor parameter injection. |
Bean<?> |
getBean()
Get the Bean object representing the Web Bean that defines the injection
point |
java.util.Set<java.lang.annotation.Annotation> |
getBindings()
Gets the binding types for this element |
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,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
|
T |
invokeOnInstance(java.lang.Object declaringInstance,
ManagerImpl manager,
CreationalContext<?> creationalContext,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
|
T |
invokeOnInstanceWithSpecialValue(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)
|
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, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, 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, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, 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()
- Description copied from interface:
InjectionPoint
- Get the annotations of the field in the case of field injection, or
annotations of the parameter in the case of method parameter or
constructor parameter injection.
- Specified by:
getAnnotations
in interface InjectionPoint
- Returns:
- the annotations of the field
getBean
public Bean<?> getBean()
- Description copied from interface:
InjectionPoint
- Get the Bean object representing the Web Bean that defines the injection
point
- Specified by:
getBean
in interface InjectionPoint
- Returns:
- the Bean object representing the Web Bean that defines the
injection point
getBindings
public java.util.Set<java.lang.annotation.Annotation> getBindings()
- Description copied from interface:
AnnotatedItem
- Gets the binding types for this element
- Specified by:
getBindings
in interface InjectionPoint
- Specified by:
getBindings
in interface AnnotatedItem<T,java.lang.reflect.Method>
- Overrides:
getBindings
in class ForwardingAnnotatedItem<T,java.lang.reflect.Method>
- Returns:
- the declared binding types of the injection point
- See Also:
AnnotatedItem
invoke
public T invoke(java.lang.Object declaringInstance,
ManagerImpl manager,
CreationalContext<?> creationalContext,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
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)
invokeOnInstance
public T invokeOnInstance(java.lang.Object declaringInstance,
ManagerImpl manager,
CreationalContext<?> creationalContext,
java.lang.Class<? extends java.lang.RuntimeException> exceptionTypeToThrow)
invokeOnInstanceWithSpecialValue
public T invokeOnInstanceWithSpecialValue(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 © 2011. All Rights Reserved.