Package org.jboss.weld.injection
Class MethodInvocationStrategy
- java.lang.Object
-
- org.jboss.weld.injection.MethodInvocationStrategy
-
public abstract class MethodInvocationStrategy extends Object
Encapsulates various strategies for invoking a method injection point. The default implementation supports all the possible scenarios including dependency injection to parameters. In addition, there are optimized implementations for commonly used scenarios such as:- an observer method with event parameter only
- an observer method with event parameter and a
BeanManagerinjection point (common in extensions) - an observer method with event parameter and an
EventMetadatainjection point
- Author:
- Jozef Hartinger, Martin Kouba
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<? extends RuntimeException>exceptionTypeToThrow
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MethodInvocationStrategyforDisposer(MethodInjectionPoint<?,?> method, BeanManagerImpl manager)static MethodInvocationStrategyforObserver(MethodInjectionPoint<?,?> method, BeanManagerImpl manager)abstract <T> voidinvoke(Object receiver, MethodInjectionPoint<?,?> method, T instance, BeanManagerImpl manager, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
-
-
-
Field Detail
-
exceptionTypeToThrow
protected final Class<? extends RuntimeException> exceptionTypeToThrow
-
-
Method Detail
-
forDisposer
public static MethodInvocationStrategy forDisposer(MethodInjectionPoint<?,?> method, BeanManagerImpl manager)
-
forObserver
public static MethodInvocationStrategy forObserver(MethodInjectionPoint<?,?> method, BeanManagerImpl manager)
-
invoke
public abstract <T> void invoke(Object receiver, MethodInjectionPoint<?,?> method, T instance, BeanManagerImpl manager, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
-
-