Package org.jboss.weld.interceptor.proxy
Class SimpleInvocationContext
- java.lang.Object
-
- org.jboss.weld.interceptor.proxy.SimpleInvocationContext
-
- All Implemented Interfaces:
javax.interceptor.InvocationContext,WeldInvocationContext
public class SimpleInvocationContext extends Object
SimpleInvocationContextimplementation whoseproceed()invokes the target method directly without calling any interceptors. If this is not a method interception, a call toproceed()always returns null.- Author:
- Marius Bogoevici, Jozef Hartinger
-
-
Field Summary
Fields Modifier and Type Field Description protected Constructor<?>constructorprotected Map<String,Object>contextDataprotected Set<Annotation>interceptorBindingsprotected Methodmethodprotected Object[]parametersprotected Methodproceedprotected Objecttargetprotected Objecttimer-
Fields inherited from interface org.jboss.weld.interceptor.WeldInvocationContext
INTERCEPTOR_BINDINGS_KEY
-
-
Constructor Summary
Constructors Constructor Description SimpleInvocationContext(Object target, Method targetMethod, Method proceed, Object[] parameters, Set<Annotation> interceptorBindings)SimpleInvocationContext(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, Set<Annotation> interceptorBindings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Constructor<?>getConstructor()Map<String,Object>getContextData()Set<Annotation>getInterceptorBindings()Return the set of interceptor bindings for a lifecycle callback, business method, timeout method, or constructor.<T extends Annotation>
Set<T>getInterceptorBindingsByType(Class<T> annotationType)Return the set of interceptor bindings with the specified annotation type.MethodgetMethod()Object[]getParameters()protected MethodgetProceed()ObjectgetTarget()ObjectgetTimer()protected static Map<String,Object>newContextData(Set<Annotation> interceptorBindings)Objectproceed()voidsetParameters(Object[] params)
-
-
-
Field Detail
-
method
protected final Method method
-
parameters
protected Object[] parameters
-
target
protected final Object target
-
timer
protected final Object timer
-
constructor
protected final Constructor<?> constructor
-
interceptorBindings
protected final Set<Annotation> interceptorBindings
-
proceed
protected final Method proceed
-
-
Constructor Detail
-
SimpleInvocationContext
public SimpleInvocationContext(Object target, Method targetMethod, Method proceed, Object[] parameters, Set<Annotation> interceptorBindings)
-
SimpleInvocationContext
public SimpleInvocationContext(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, Set<Annotation> interceptorBindings)
-
-
Method Detail
-
getContextData
public Map<String,Object> getContextData()
- Specified by:
getContextDatain interfacejavax.interceptor.InvocationContext
-
newContextData
protected static Map<String,Object> newContextData(Set<Annotation> interceptorBindings)
-
getMethod
public Method getMethod()
- Specified by:
getMethodin interfacejavax.interceptor.InvocationContext
-
getParameters
public Object[] getParameters()
- Specified by:
getParametersin interfacejavax.interceptor.InvocationContext
-
getTarget
public Object getTarget()
- Specified by:
getTargetin interfacejavax.interceptor.InvocationContext
-
setParameters
public void setParameters(Object[] params)
- Specified by:
setParametersin interfacejavax.interceptor.InvocationContext
-
getTimer
public Object getTimer()
- Specified by:
getTimerin interfacejavax.interceptor.InvocationContext
-
getConstructor
public Constructor<?> getConstructor()
- Specified by:
getConstructorin interfacejavax.interceptor.InvocationContext
-
getInterceptorBindingsByType
public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType)
Description copied from interface:WeldInvocationContextReturn the set of interceptor bindings with the specified annotation type.- Specified by:
getInterceptorBindingsByTypein interfaceWeldInvocationContext- Type Parameters:
T- subclass ofAnnotation- Parameters:
annotationType- type of annotation- Returns:
- a set of interceptor bindings with the specified annotation type
- See Also:
WeldInvocationContext.getInterceptorBindings()
-
getInterceptorBindings
public Set<Annotation> getInterceptorBindings()
Description copied from interface:WeldInvocationContextReturn the set of interceptor bindings for a lifecycle callback, business method, timeout method, or constructor.The returned set may be empty if only interceptors using the
Interceptorsannotation are associated.- Specified by:
getInterceptorBindingsin interfaceWeldInvocationContext- Returns:
- a set of interceptor bindings
-
getProceed
protected Method getProceed()
-
-