org.jboss.aop.proxy.container
Class ClassProxyContainer

java.lang.Object
  extended by org.jboss.aop.Advisor
      extended by org.jboss.aop.ClassContainer
          extended by 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

Field Summary
 
Fields inherited from class org.jboss.aop.ClassContainer
advisedFields
 
Fields inherited from class org.jboss.aop.Advisor
adviceBindings, adviceInterceptors, advisedMethods, annotations, aspects, classAnnotations, classMetaData, classMetaDataBindings, clazz, constructionInfos, constructionInterceptors, constructorInfos, constructorInterceptors, constructorMetaData, constructors, defaultMetaData, doesHaveAspects, fieldMetaData, interfaceIntroductions, manager, methodInterceptors, methodMetaData, name, perInstanceAspectDefinitions, perInstanceJoinpointAspectDefinitions
 
Constructor Summary
ClassProxyContainer(String name, AspectManager manager)
           
 
Method Summary
 boolean chainOverridingForInheritedMethods()
          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.
protected  void createConstructorTables()
           
 InstanceProxyContainer createInstanceProxyContainer()
           
 InstanceProxyContainer createInstanceProxyContainer(InterfaceIntroduction introduction)
           
protected  void createMethodMap()
           
 void initialise(Class proxiedClass)
           
 
Methods inherited from class org.jboss.aop.ClassContainer
addClassMetaData, bindClassMetaData, createFieldTable, createInterceptorChains, createMethodInfo, initializeClassContainer, initializeMetadata, initializeMethodChain, rebindClassMetaData, rebuildInterceptors, removeClassMetaData, setChainOverridingForInheritedMethods, setClass
 
Methods inherited from class org.jboss.aop.Advisor
addAdviceInterceptor, addInterfaceIntroduction, addPerClassAspect, addPerInstanceAspect, addPerInstanceJoinpointAspect, cleanup, createInterceptorChain, deployAnnotationOverride, deployAnnotationOverrides, deployMethodAnnotationOverrides, dynamicInvoke, finalizeConstructionChain, finalizeConstructorChain, finalizeMethodChain, getAdviceInterceptor, getAllMethods, getAnnotations, getClassMetaData, getClassMetadataBindings, getClazz, getConstructionInfos, getConstructionInterceptors, getConstructorInfos, getConstructorInterceptors, getConstructorMetaData, getConstructors, getDefaultMetaData, getFieldMetaData, getInterfaceIntroductions, getManager, getMethodInfo, getMethodMetaData, getName, getPerClassAspect, getPerClassAspect, getPerInstanceAspectDefinitions, getPerInstanceJoinpointAspectDefinitions, getSimpleName, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAspects, initializeConstructionChain, initializeConstructorChain, initializeInterfaceIntroductions, newBindingAdded, pointcutResolved, populateInterceptorsFromInfos, removeAdviceBinding, removeAdviceBindings, removeInterfaceIntroduction, removePerClassAspect, removePerInstanceAspect, removePerInstanceJoinpointAspect, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveConstructionPointcut, resolveConstructorPointcut, resolveMethodPointcut, setManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassProxyContainer

public ClassProxyContainer(String name,
                           AspectManager manager)
Method Detail

createConstructorTables

protected void createConstructorTables()
Overrides:
createConstructorTables in class ClassContainer

createMethodMap

protected void createMethodMap()
Overrides:
createMethodMap in class ClassContainer

createInstanceProxyContainer

public InstanceProxyContainer createInstanceProxyContainer(InterfaceIntroduction introduction)

createInstanceProxyContainer

public InstanceProxyContainer createInstanceProxyContainer()

initialise

public void initialise(Class proxiedClass)

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:
the value of chainOverridingForInheritedMethods
See Also:
Advisor.chainOverridingForInheritedMethods()


Copyright © 2004 JBoss Inc. All Rights Reserved.