org.springframework.jee.intercept
Class InterceptorMetadata
java.lang.Object
org.springframework.jee.inject.Jsr250Metadata
org.springframework.jee.intercept.InterceptorMetadata
- All Implemented Interfaces:
- Jsr250MetadataI, InterceptorMetadataI
public class InterceptorMetadata
- extends Jsr250Metadata
- implements InterceptorMetadataI
Class representing metadata about an interceptor class. Includes JSR-250
metadata that can drive injection and lifecycle callbacks, and identification
of an around invoke method on the class. The latter information is often, but
not necessarily, supplied using an annotation.
- Author:
- Rod Johnson
Constructor Summary |
InterceptorMetadata(Class<?> componentClass,
List<Method> aroundInvokeMethods)
Construct new class level interceptor metadata with component name
defaulting to the FQN of the component class |
InterceptorMetadata(Class<?> componentClass,
List<Method> aroundInvokeMethods,
Method matchingMethod)
Construct new interceptor metadata with component name
defaulting to the FQN of the component class
method level interceptor if (matchingMethod != null)
class level interceptor if (matchingMethod == null) |
InterceptorMetadata(Jsr250Metadata jsr250,
List<Method> aroundInvokeMethods)
Create a new Interceptor metadata for a self interceptor. |
Methods inherited from class org.springframework.jee.inject.Jsr250Metadata |
addInjection, applyInjections, getBeanDefinition, getBeanDefinitionRegistry, getComponentClass, getComponentContext, getComponentName, getDeploymentUnitMetadata, getInjections, getLifecycleEventCallbackMethod, getUniqueInstanceOfType, inject, injectAndPostConstruct, invokeLifecycleMethod, invokeLifecycleMethod, invokeLifecycleMethods, invokePostConstructAndRegisterShutdownHook, refresh, registerLifecycleEventCallbackMethod, resolve, resolveByType, setBeanDefinition, setComponentContext, toString |
InterceptorMetadata
public InterceptorMetadata(Class<?> componentClass,
List<Method> aroundInvokeMethods,
Method matchingMethod)
- Construct new interceptor metadata with component name
defaulting to the FQN of the component class
method level interceptor if (matchingMethod != null)
class level interceptor if (matchingMethod == null)
- Parameters:
componentClass
- aroundInvokeMethod
- matchingMethod
-
InterceptorMetadata
public InterceptorMetadata(Class<?> componentClass,
List<Method> aroundInvokeMethods)
- Construct new class level interceptor metadata with component name
defaulting to the FQN of the component class
- Parameters:
componentClass
- aroundInvokeMethod
-
InterceptorMetadata
public InterceptorMetadata(Jsr250Metadata jsr250,
List<Method> aroundInvokeMethods)
- Create a new Interceptor metadata for a self interceptor. The component
definition already exists.
- Parameters:
jsr250
- Jsr250 metadata we should wraparoundInvokeMethod
- aroundInvoke method to use on the instance
registerLifecycleEventListenerMethod
public void registerLifecycleEventListenerMethod(LifecycleEvent le,
Method m)
- Specified by:
registerLifecycleEventListenerMethod
in interface InterceptorMetadataI
getLifecycleEventListenerMethod
public List<Method> getLifecycleEventListenerMethod(LifecycleEvent le)
- Return the invocation-context style method for this callback
- Specified by:
getLifecycleEventListenerMethod
in interface InterceptorMetadataI
getAroundInvokeMethods
public List<Method> getAroundInvokeMethods()
- Specified by:
getAroundInvokeMethods
in interface InterceptorMetadataI
getMatchingMethod
public Method getMatchingMethod()
- Specified by:
getMatchingMethod
in interface InterceptorMetadataI
- Returns:
- the method that this matches on, or null if it is a class level
interceptor
isClassInterceptor
public boolean isClassInterceptor()
- Specified by:
isClassInterceptor
in interface InterceptorMetadataI
- Returns:
- the classInterceptor
setClassInterceptor
public void setClassInterceptor(boolean classInterceptor)
- Specified by:
setClassInterceptor
in interface InterceptorMetadataI
- Parameters:
classInterceptor
- the classInterceptor to set
isDefaultInterceptor
public boolean isDefaultInterceptor()
- Specified by:
isDefaultInterceptor
in interface InterceptorMetadataI
- Returns:
- the defaultInterceptor
setDefaultInterceptor
public void setDefaultInterceptor(boolean defaultInterceptor)
- Specified by:
setDefaultInterceptor
in interface InterceptorMetadataI
- Parameters:
defaultInterceptor
- the defaultInterceptor to set
setComponentContext
public void setComponentContext(ApplicationContext beanFactoryForInstance,
BeanDefinitionRegistry bdr)
- Overrides:
setComponentContext
in class Jsr250Metadata
Copyright © 2006-2008 SpringSource (formerly Interface21). All Rights Reserved.