org.jboss.aop.proxy.container
Class ClassProxyContainer
java.lang.Object
org.jboss.aop.Advisor
org.jboss.aop.ClassContainer
org.jboss.aop.proxy.container.ClassProxyContainer
- Direct Known Subclasses:
- InstanceProxyContainer
public class ClassProxyContainer
- extends ClassContainer
Extension of ClassContainer needed because of Mixins
we want to be able to match pointcut expressions on the base class of the delegate
we also want to be able to match pointcuts of instanceof{} of the Mixin interfaces.
We also want to create constructor tables based on the constructor of the delegate so we can intercept
construction
- Author:
- Bill Burke
Fields inherited from class org.jboss.aop.Advisor |
adviceBindings, adviceInterceptors, advisedMethods, annotations, aspects, classMetaData, classMetaDataBindings, clazz, constructionInfos, constructionInterceptors, constructorInfos, constructorInterceptors, constructorMetaData, constructors, defaultMetaData, doesHaveAspects, fieldMetaData, interfaceIntroductions, lazyCollectionLock, loader, manager, methodInfos, methodInterceptors, methodMetaData, name, NULL_ASPECT, perInstanceAspectDefinitions, perInstanceJoinpointAspectDefinitions |
Methods inherited from class org.jboss.aop.ClassContainer |
addClassMetaData, bindClassMetaData, createFieldTable, createInterceptorChains, initializeClassContainer, initializeClassContainer, initializeMetadata, initializeMethodChain, rebindClassMetaData, rebuildInterceptors, rebuildInterceptorsForAddedBinding, rebuildInterceptorsForRemovedBinding, removeClassMetaData, setChainOverridingForInheritedMethods, setClass, updateInterceptorChains |
Methods inherited from class org.jboss.aop.Advisor |
addAdviceInterceptor, addInterfaceIntroduction, addPerInstanceAspect, addPerInstanceJoinpointAspect, adjustInfoForAddedBinding, cleanup, createInterceptorChain, deployAnnotationOverride, deployAnnotationOverrides, deployMethodAnnotationOverrides, doDeployAnnotationOverride, dynamicInvoke, finalizeChain, finalizeMethodChain, getAdviceInterceptor, getAllMethods, getAnnotations, getClassLoader, getClassMetaData, getClassMetadataBindings, getClazz, getConstructionInfos, getConstructionInterceptors, getConstructorInfos, getConstructorInterceptors, getConstructorMetaData, getConstructors, getDefaultMetaData, getFieldMetaData, getInterfaceIntroductions, getManager, getMetadata, getMethodInfo, getMethodMetaData, getName, getPerClassAspect, getPerInstanceAspectDefinitions, getPerInstanceJoinpointAspectDefinitions, getPerVMAspect, getSimpleName, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAspects, hasSameConstructorAspectLength, hasSameMethodAspectLength, initAdvisedMethodsMap, initClassMetaDataBindingsList, initializeConstructionChain, initializeConstructorChain, initializeInterfaceIntroductions, initInterfaceIntroductionsList, initPerInstanceAspectDefinitionsSet, initPerInstanceJoinpointAspectDefinitionsMap, lockWriteChain, lockWriteChain, newBindingAdded, newBindingAdded, pointcutResolved, populateInterceptorsFromInfos, removeAdviceBinding, removeAdviceBindings, removeInterfaceIntroduction, removePerClassAspect, removePerInstanceAspect, removePerInstanceJoinpointAspect, resetChain, resetChain, resetChainKeepInterceptors, resetChainKeepInterceptors, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveConstructionPointcut, resolveConstructorPointcut, resolveMethodPointcut, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, setManager, setMetadata, unlockWriteChain, unlockWriteChain, updateConstructionPointcutAfterRemove, updateConstructorPointcutAfterRemove, updateFieldPointcutAfterRemove, updateFieldPointcutAfterRemove, updateMethodPointcutAfterRemove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassProxyContainer
public ClassProxyContainer(String name,
AspectManager manager)
createConstructorTables
protected void createConstructorTables()
- Overrides:
createConstructorTables
in class ClassContainer
createMethodMap
protected void createMethodMap()
- Overrides:
createMethodMap
in class ClassContainer
createInstanceProxyContainer
public InstanceProxyContainer createInstanceProxyContainer()
initialise
public void initialise(Class<?> proxiedClass)
getParentAdvisor
protected Advisor getParentAdvisor()
addPerClassAspect
public void addPerClassAspect(AspectDefinition def)
- Overrides:
addPerClassAspect
in class Advisor
getPerClassAspect
public Object getPerClassAspect(AspectDefinition def)
- If this is an instance advisor, will check with parent advisor if the aspect
is already registered. If so, we should use the one from the parent advisor
- Overrides:
getPerClassAspect
in class Advisor
chainOverridingForInheritedMethods
public boolean chainOverridingForInheritedMethods()
- Description copied from class:
Advisor
- Whether the type of advisor supports matching on pointcut expression, where the method is defined in a superclass only,
while the pointcut expression class matches the subclass. This is currently only supported for generated advisors, due to
the new weaving model. So (with generated advisors) if we have
public class Super {
void method(){}
}
public class Sub etxends Super {
}
and
<bind pointcut="execution(* Super->method())">
<interceptor class="A"/>
</bind>
<bind pointcut="execution(* sub->method())">
<interceptor class="B"/>
</bind>
Super.method() will be intercepted by A only
Sub.method() will be intercepted by A and B
- Overrides:
chainOverridingForInheritedMethods
in class ClassContainer
- Returns:
- true always
- See Also:
Advisor.chainOverridingForInheritedMethods()
getMethodInfos
public MethodInfo[] getMethodInfos()
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.