程序包 infra.aop.config

类 ConfigBeanDefinitionParser

java.lang.Object
infra.aop.config.ConfigBeanDefinitionParser
所有已实现的接口:
infra.beans.factory.xml.BeanDefinitionParser

class ConfigBeanDefinitionParser extends Object implements infra.beans.factory.xml.BeanDefinitionParser
BeanDefinitionParser for the <aop:config> tag.
从以下版本开始:
4.0
作者:
Rob Harrop, Juergen Hoeller, Adrian Colyer, Mark Fisher, Ramnivas Laddad
  • 字段详细资料

  • 构造器详细资料

    • ConfigBeanDefinitionParser

      ConfigBeanDefinitionParser()
  • 方法详细资料

    • parse

      @Nullable public infra.beans.factory.config.BeanDefinition parse(Element element, infra.beans.factory.xml.ParserContext parserContext)
      指定者:
      parse 在接口中 infra.beans.factory.xml.BeanDefinitionParser
    • configureAutoProxyCreator

      private void configureAutoProxyCreator(infra.beans.factory.xml.ParserContext parserContext, Element element)
      Configures the auto proxy creator needed to support the BeanDefinitions created by the '<aop:config/>' tag. Will force class proxying if the 'proxy-target-class' attribute is set to 'true'.
      另请参阅:
    • parseAdvisor

      private void parseAdvisor(Element advisorElement, infra.beans.factory.xml.ParserContext parserContext)
      Parses the supplied <advisor> element and registers the resulting Advisor and any resulting Pointcut with the supplied BeanDefinitionRegistry.
    • createAdvisorBeanDefinition

      private infra.beans.factory.support.AbstractBeanDefinition createAdvisorBeanDefinition(Element advisorElement, infra.beans.factory.xml.ParserContext parserContext)
      Create a RootBeanDefinition for the advisor described in the supplied. Does not parse any associated 'pointcut' or 'pointcut-ref' attributes.
    • parseAspect

      private void parseAspect(Element aspectElement, infra.beans.factory.xml.ParserContext parserContext)
    • createAspectComponentDefinition

      private AspectComponentDefinition createAspectComponentDefinition(Element aspectElement, String aspectId, List<infra.beans.factory.config.BeanDefinition> beanDefs, List<infra.beans.factory.config.BeanReference> beanRefs, infra.beans.factory.xml.ParserContext parserContext)
    • isAdviceNode

      private boolean isAdviceNode(Node aNode, infra.beans.factory.xml.ParserContext parserContext)
      Return true if the supplied node describes an advice type. May be one of: 'before', 'after', 'after-returning', 'after-throwing' or 'around'.
    • parseDeclareParents

      private infra.beans.factory.support.AbstractBeanDefinition parseDeclareParents(Element declareParentsElement, infra.beans.factory.xml.ParserContext parserContext)
      Parse a 'declare-parents' element and register the appropriate DeclareParentsAdvisor with the BeanDefinitionRegistry encapsulated in the supplied ParserContext.
    • parseAdvice

      private infra.beans.factory.support.AbstractBeanDefinition parseAdvice(String aspectName, int order, Element aspectElement, Element adviceElement, infra.beans.factory.xml.ParserContext parserContext, List<infra.beans.factory.config.BeanDefinition> beanDefinitions, List<infra.beans.factory.config.BeanReference> beanReferences)
      Parses one of 'before', 'after', 'after-returning', 'after-throwing' or 'around' and registers the resulting BeanDefinition with the supplied BeanDefinitionRegistry.
      返回:
      the generated advice RootBeanDefinition
    • createAdviceDefinition

      private infra.beans.factory.support.AbstractBeanDefinition createAdviceDefinition(Element adviceElement, infra.beans.factory.xml.ParserContext parserContext, String aspectName, int order, infra.beans.factory.support.RootBeanDefinition methodDef, infra.beans.factory.support.RootBeanDefinition aspectFactoryDef, List<infra.beans.factory.config.BeanDefinition> beanDefinitions, List<infra.beans.factory.config.BeanReference> beanReferences)
      Creates the RootBeanDefinition for a POJO advice bean. Also causes pointcut parsing to occur so that the pointcut may be associate with the advice bean. This same pointcut is also configured as the pointcut for the enclosing Advisor definition using the supplied PropertyValues.
    • getAdviceClass

      private Class<?> getAdviceClass(Element adviceElement, infra.beans.factory.xml.ParserContext parserContext)
      Gets the advice implementation class corresponding to the supplied Element.
    • parsePointcut

      private infra.beans.factory.support.AbstractBeanDefinition parsePointcut(Element pointcutElement, infra.beans.factory.xml.ParserContext parserContext)
      Parses the supplied <pointcut> and registers the resulting Pointcut with the BeanDefinitionRegistry.
    • parsePointcutProperty

      @Nullable private Object parsePointcutProperty(Element element, infra.beans.factory.xml.ParserContext parserContext)
      Parses the pointcut or pointcut-ref attributes of the supplied Element and add a pointcut property as appropriate. Generates a BeanDefinition for the pointcut if necessary and returns its bean name, otherwise returns the bean name of the referred pointcut.
    • createPointcutDefinition

      protected infra.beans.factory.support.AbstractBeanDefinition createPointcutDefinition(String expression)
      Creates a BeanDefinition for the AspectJExpressionPointcut class using the supplied pointcut expression.