org.jboss.aop
Class ClassContainer

java.lang.Object
  extended by org.jboss.aop.Advisor
      extended by org.jboss.aop.ClassContainer
Direct Known Subclasses:
ClassProxyContainer

public class ClassContainer
extends Advisor

Comment

Version:
$Revision: 59703 $
Author:
Bill Burke

Field Summary
protected  Field[] 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
ClassContainer(String name, AspectManager manager)
           
 
Method Summary
 void addClassMetaData(ClassMetaDataBinding data)
           
protected  void bindClassMetaData(ClassMetaDataBinding data)
           
 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()
           
protected  void createFieldTable()
          Gets advised methods.
protected  void createInterceptorChains()
           
protected  MethodInfo createMethodInfo()
           
protected  void createMethodMap()
           
 void initializeClassContainer()
           
 void initializeMetadata()
           
protected  gnu.trove.TLongObjectHashMap initializeMethodChain()
           
protected  void rebindClassMetaData()
           
protected  void rebuildInterceptors()
           
 void removeClassMetaData(ClassMetaDataBinding data)
           
protected  void setChainOverridingForInheritedMethods(boolean overriding)
           
 void setClass(Class clazz)
           
 
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
 

Field Detail

advisedFields

protected Field[] advisedFields
Constructor Detail

ClassContainer

public ClassContainer(String name,
                      AspectManager manager)
Method Detail

initializeClassContainer

public void initializeClassContainer()

setClass

public void setClass(Class clazz)

initializeMetadata

public void initializeMetadata()

createFieldTable

protected void createFieldTable()
Gets advised methods.


rebuildInterceptors

protected void rebuildInterceptors()
Specified by:
rebuildInterceptors in class Advisor

addClassMetaData

public void addClassMetaData(ClassMetaDataBinding data)
Specified by:
addClassMetaData in class Advisor

removeClassMetaData

public void removeClassMetaData(ClassMetaDataBinding data)
Specified by:
removeClassMetaData in class Advisor

bindClassMetaData

protected void bindClassMetaData(ClassMetaDataBinding data)

rebindClassMetaData

protected void rebindClassMetaData()

createMethodMap

protected void createMethodMap()

createMethodInfo

protected MethodInfo createMethodInfo()

initializeMethodChain

protected gnu.trove.TLongObjectHashMap initializeMethodChain()

createConstructorTables

protected void createConstructorTables()

createInterceptorChains

protected void createInterceptorChains()

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

setChainOverridingForInheritedMethods

protected void setChainOverridingForInheritedMethods(boolean overriding)
Overrides:
setChainOverridingForInheritedMethods in class Advisor
Parameters:
overriding - the new value of chainOverridingForInheritedMethods
See Also:
Advisor.chainOverridingForInheritedMethods()


Copyright © 2004 JBoss Inc. All Rights Reserved.