org.jboss.webbeans.injection
Class MethodInjectionPoint<T>

java.lang.Object
  extended by org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,S>
      extended by org.jboss.webbeans.introspector.ForwardingAnnotatedMember<T,java.lang.reflect.Method>
          extended by org.jboss.webbeans.introspector.ForwardingAnnotatedMethod<T>
              extended by 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>


Field Summary
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedMethod
MAPPED_PARAMETER_ANNOTATIONS
 
Constructor Summary
protected MethodInjectionPoint(Bean<?> declaringBean, AnnotatedMethod<T> 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
<T> MethodInjectionPoint<T>
of(Bean<?> declaringBean, AnnotatedMethod<T> method)
           
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedMethod
getAnnotatedMethod, getAnnotatedParameters, getDeclaringClass, getParameterTypesAsArray, getPropertyName, invoke, invokeOnInstance, isEquivalent, wrap
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedMember
getMember
 
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 javax.inject.manager.InjectionPoint
getAnnotation, getMember, getType, isAnnotationPresent
 
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
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedMember
getMember
 

Constructor Detail

MethodInjectionPoint

protected MethodInjectionPoint(Bean<?> declaringBean,
                               AnnotatedMethod<T> method)
Method Detail

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 into
value - 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 up
manager - The Web Beans manager
Returns:
The object array of looked up values


Copyright © 2008-2009. All Rights Reserved.