public class SimpleInvocationContext
extends java.lang.Object
InvocationContext implementation whose proceed() invokes the target method directly without calling any interceptors. If this is not
a method interception, a call to proceed() always returns null.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.reflect.Constructor<?> |
constructor |
protected java.util.Map<java.lang.String,java.lang.Object> |
contextData |
protected java.util.Set<java.lang.annotation.Annotation> |
interceptorBindings |
protected java.lang.reflect.Method |
method |
protected java.lang.Object[] |
parameters |
protected java.lang.reflect.Method |
proceed |
protected java.lang.Object |
target |
protected java.lang.Object |
timer |
| Constructor and Description |
|---|
SimpleInvocationContext(java.lang.reflect.Constructor<?> constructor,
java.lang.Object[] parameters,
java.util.Map<java.lang.String,java.lang.Object> contextData,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings) |
SimpleInvocationContext(java.lang.Object target,
java.lang.reflect.Method targetMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] parameters,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.Constructor<?> |
getConstructor() |
java.util.Map<java.lang.String,java.lang.Object> |
getContextData() |
java.util.Set<java.lang.annotation.Annotation> |
getInterceptorBindings()
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
<T extends java.lang.annotation.Annotation> |
getInterceptorBindingsByType(java.lang.Class<T> annotationType)
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
java.lang.reflect.Method |
getMethod() |
java.lang.Object[] |
getParameters() |
protected java.lang.reflect.Method |
getProceed() |
java.lang.Object |
getTarget() |
java.lang.Object |
getTimer() |
protected static java.util.Map<java.lang.String,java.lang.Object> |
newContextData(java.util.Set<java.lang.annotation.Annotation> interceptorBindings) |
java.lang.Object |
proceed() |
void |
setParameters(java.lang.Object[] params) |
protected java.util.Map<java.lang.String,java.lang.Object> contextData
protected final java.lang.reflect.Method method
protected java.lang.Object[] parameters
protected final java.lang.Object target
protected final java.lang.Object timer
protected final java.lang.reflect.Constructor<?> constructor
protected final java.util.Set<java.lang.annotation.Annotation> interceptorBindings
protected final java.lang.reflect.Method proceed
public SimpleInvocationContext(java.lang.Object target,
java.lang.reflect.Method targetMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] parameters,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings)
public SimpleInvocationContext(java.lang.reflect.Constructor<?> constructor,
java.lang.Object[] parameters,
java.util.Map<java.lang.String,java.lang.Object> contextData,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings)
public java.lang.Object proceed()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.Map<java.lang.String,java.lang.Object> getContextData()
getContextData in interface InvocationContextprotected static java.util.Map<java.lang.String,java.lang.Object> newContextData(java.util.Set<java.lang.annotation.Annotation> interceptorBindings)
public java.lang.reflect.Method getMethod()
getMethod in interface InvocationContextpublic java.lang.Object[] getParameters()
getParameters in interface InvocationContextpublic java.lang.Object getTarget()
getTarget in interface InvocationContextpublic void setParameters(java.lang.Object[] params)
setParameters in interface InvocationContextpublic java.lang.Object getTimer()
getTimer in interface InvocationContextpublic java.lang.reflect.Constructor<?> getConstructor()
getConstructor in interface InvocationContextpublic <T extends java.lang.annotation.Annotation> java.util.Set<T> getInterceptorBindingsByType(java.lang.Class<T> annotationType)
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindingsByType in interface ExperimentalInvocationContextT - subclass of AnnotationannotationType - type of annotationpublic java.util.Set<java.lang.annotation.Annotation> getInterceptorBindings()
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindings in interface ExperimentalInvocationContextprotected java.lang.reflect.Method getProceed()
Copyright © 2015. All Rights Reserved.