|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.config.ConfigBeanDefinitionParser
class ConfigBeanDefinitionParser
BeanDefinitionParser
for the <aop:config>
tag.
Field Summary | |
---|---|
private static java.lang.String |
ADVICE_BEAN_NAME
|
private static java.lang.String |
ADVICE_REF
|
private static java.lang.String |
ADVISOR
|
private static java.lang.String |
AFTER
|
private static java.lang.String |
AFTER_RETURNING_ELEMENT
|
private static java.lang.String |
AFTER_THROWING_ELEMENT
|
private static java.lang.String |
ARG_NAMES
|
private static java.lang.String |
ARG_NAMES_PROPERTY
|
private static java.lang.String |
AROUND
|
private static java.lang.String |
ASPECT
|
private static int |
ASPECT_INSTANCE_FACTORY_INDEX
|
private static java.lang.String |
ASPECT_NAME_PROPERTY
|
private static java.lang.String |
BEFORE
|
private static java.lang.String |
DECLARATION_ORDER_PROPERTY
|
private static java.lang.String |
DECLARE_PARENTS
|
private static java.lang.String |
DEFAULT_IMPL
|
private static java.lang.String |
DELEGATE_REF
|
private static java.lang.String |
EXPRESSION
|
private static java.lang.String |
ID
|
private static java.lang.String |
IMPLEMENT_INTERFACE
|
private static int |
METHOD_INDEX
|
private static java.lang.String |
ORDER_PROPERTY
|
private ParseState |
parseState
|
private static java.lang.String |
POINTCUT
|
private static int |
POINTCUT_INDEX
|
private static java.lang.String |
POINTCUT_REF
|
private static java.lang.String |
REF
|
private static java.lang.String |
RETURNING
|
private static java.lang.String |
RETURNING_PROPERTY
|
private static java.lang.String |
THROWING
|
private static java.lang.String |
THROWING_PROPERTY
|
private static java.lang.String |
TYPE_PATTERN
|
Constructor Summary | |
---|---|
ConfigBeanDefinitionParser()
|
Method Summary | |
---|---|
private void |
configureAutoProxyCreator(ParserContext parserContext,
org.w3c.dom.Element element)
Configures the auto proxy creator needed to support the BeanDefinitions
created by the '<aop:config/> ' tag. |
private AbstractBeanDefinition |
createAdviceDefinition(org.w3c.dom.Element adviceElement,
ParserContext parserContext,
java.lang.String aspectName,
int order,
RootBeanDefinition methodDef,
RootBeanDefinition aspectFactoryDef,
java.util.List<BeanDefinition> beanDefinitions,
java.util.List<BeanReference> beanReferences)
Creates the RootBeanDefinition for a POJO advice bean. |
private AbstractBeanDefinition |
createAdvisorBeanDefinition(org.w3c.dom.Element advisorElement,
ParserContext parserContext)
Create a RootBeanDefinition for the advisor described in the supplied. |
private AspectComponentDefinition |
createAspectComponentDefinition(org.w3c.dom.Element aspectElement,
java.lang.String aspectId,
java.util.List<BeanDefinition> beanDefs,
java.util.List<BeanReference> beanRefs,
ParserContext parserContext)
|
protected AbstractBeanDefinition |
createPointcutDefinition(java.lang.String expression)
Creates a BeanDefinition for the AspectJExpressionPointcut class using
the supplied pointcut expression. |
private java.lang.Class |
getAdviceClass(org.w3c.dom.Element adviceElement,
ParserContext parserContext)
Gets the advice implementation class corresponding to the supplied Element . |
private boolean |
isAdviceNode(org.w3c.dom.Node aNode,
ParserContext parserContext)
Return true if the supplied node describes an advice type. |
BeanDefinition |
parse(org.w3c.dom.Element element,
ParserContext parserContext)
Parse the specified Element and register the resulting
BeanDefinition(s) with the
BeanDefinitionRegistry
embedded in the supplied ParserContext . |
private AbstractBeanDefinition |
parseAdvice(java.lang.String aspectName,
int order,
org.w3c.dom.Element aspectElement,
org.w3c.dom.Element adviceElement,
ParserContext parserContext,
java.util.List<BeanDefinition> beanDefinitions,
java.util.List<BeanReference> beanReferences)
Parses one of ' before ', 'after ', 'after-returning ',
'after-throwing ' or 'around ' and registers the resulting
BeanDefinition with the supplied BeanDefinitionRegistry. |
private void |
parseAdvisor(org.w3c.dom.Element advisorElement,
ParserContext parserContext)
Parses the supplied <advisor> element and registers the resulting
Advisor and any resulting Pointcut
with the supplied BeanDefinitionRegistry . |
private void |
parseAspect(org.w3c.dom.Element aspectElement,
ParserContext parserContext)
|
private AbstractBeanDefinition |
parseDeclareParents(org.w3c.dom.Element declareParentsElement,
ParserContext parserContext)
Parse a ' declare-parents ' element and register the appropriate
DeclareParentsAdvisor with the BeanDefinitionRegistry encapsulated in the
supplied ParserContext. |
private AbstractBeanDefinition |
parsePointcut(org.w3c.dom.Element pointcutElement,
ParserContext parserContext)
Parses the supplied <pointcut> and registers the resulting
Pointcut with the BeanDefinitionRegistry. |
private java.lang.Object |
parsePointcutProperty(org.w3c.dom.Element element,
ParserContext parserContext)
Parses the pointcut or pointcut-ref attributes of the supplied
Element and add a pointcut property as appropriate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ASPECT
private static final java.lang.String EXPRESSION
private static final java.lang.String ID
private static final java.lang.String POINTCUT
private static final java.lang.String ADVICE_BEAN_NAME
private static final java.lang.String ADVISOR
private static final java.lang.String ADVICE_REF
private static final java.lang.String POINTCUT_REF
private static final java.lang.String REF
private static final java.lang.String BEFORE
private static final java.lang.String DECLARE_PARENTS
private static final java.lang.String TYPE_PATTERN
private static final java.lang.String DEFAULT_IMPL
private static final java.lang.String DELEGATE_REF
private static final java.lang.String IMPLEMENT_INTERFACE
private static final java.lang.String AFTER
private static final java.lang.String AFTER_RETURNING_ELEMENT
private static final java.lang.String AFTER_THROWING_ELEMENT
private static final java.lang.String AROUND
private static final java.lang.String RETURNING
private static final java.lang.String RETURNING_PROPERTY
private static final java.lang.String THROWING
private static final java.lang.String THROWING_PROPERTY
private static final java.lang.String ARG_NAMES
private static final java.lang.String ARG_NAMES_PROPERTY
private static final java.lang.String ASPECT_NAME_PROPERTY
private static final java.lang.String DECLARATION_ORDER_PROPERTY
private static final java.lang.String ORDER_PROPERTY
private static final int METHOD_INDEX
private static final int POINTCUT_INDEX
private static final int ASPECT_INSTANCE_FACTORY_INDEX
private ParseState parseState
Constructor Detail |
---|
ConfigBeanDefinitionParser()
Method Detail |
---|
public BeanDefinition parse(org.w3c.dom.Element element, ParserContext parserContext)
BeanDefinitionParser
Element
and register the resulting
BeanDefinition(s)
with the
BeanDefinitionRegistry
embedded in the supplied ParserContext
.
Implementations must return the primary BeanDefinition
that results
from the parse if they will ever be used in a nested fashion (for example as
an inner tag in a <property/>
tag). Implementations may return
null
if they will not be used in a nested fashion.
parse
in interface BeanDefinitionParser
element
- the element that is to be parsed into one or more BeanDefinitions
parserContext
- the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistry
BeanDefinition
private void configureAutoProxyCreator(ParserContext parserContext, org.w3c.dom.Element element)
BeanDefinitions
created by the '<aop:config/>
' tag. Will force class proxying if the
'proxy-target-class
' attribute is set to 'true
'.
AopNamespaceUtils
private void parseAdvisor(org.w3c.dom.Element advisorElement, ParserContext parserContext)
<advisor>
element and registers the resulting
Advisor
and any resulting Pointcut
with the supplied BeanDefinitionRegistry
.
private AbstractBeanDefinition createAdvisorBeanDefinition(org.w3c.dom.Element advisorElement, ParserContext parserContext)
RootBeanDefinition
for the advisor described in the supplied. Does not
parse any associated 'pointcut
' or 'pointcut-ref
' attributes.
private void parseAspect(org.w3c.dom.Element aspectElement, ParserContext parserContext)
private AspectComponentDefinition createAspectComponentDefinition(org.w3c.dom.Element aspectElement, java.lang.String aspectId, java.util.List<BeanDefinition> beanDefs, java.util.List<BeanReference> beanRefs, ParserContext parserContext)
private boolean isAdviceNode(org.w3c.dom.Node aNode, ParserContext parserContext)
true
if the supplied node describes an advice type. May be one of:
'before
', 'after
', 'after-returning
',
'after-throwing
' or 'around
'.
private AbstractBeanDefinition parseDeclareParents(org.w3c.dom.Element declareParentsElement, ParserContext parserContext)
declare-parents
' element and register the appropriate
DeclareParentsAdvisor with the BeanDefinitionRegistry encapsulated in the
supplied ParserContext.
private AbstractBeanDefinition parseAdvice(java.lang.String aspectName, int order, org.w3c.dom.Element aspectElement, org.w3c.dom.Element adviceElement, ParserContext parserContext, java.util.List<BeanDefinition> beanDefinitions, java.util.List<BeanReference> beanReferences)
before
', 'after
', 'after-returning
',
'after-throwing
' or 'around
' and registers the resulting
BeanDefinition with the supplied BeanDefinitionRegistry.
private AbstractBeanDefinition createAdviceDefinition(org.w3c.dom.Element adviceElement, ParserContext parserContext, java.lang.String aspectName, int order, RootBeanDefinition methodDef, RootBeanDefinition aspectFactoryDef, java.util.List<BeanDefinition> beanDefinitions, java.util.List<BeanReference> beanReferences)
private java.lang.Class getAdviceClass(org.w3c.dom.Element adviceElement, ParserContext parserContext)
Element
.
private AbstractBeanDefinition parsePointcut(org.w3c.dom.Element pointcutElement, ParserContext parserContext)
<pointcut>
and registers the resulting
Pointcut with the BeanDefinitionRegistry.
private java.lang.Object parsePointcutProperty(org.w3c.dom.Element element, ParserContext parserContext)
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.
protected AbstractBeanDefinition createPointcutDefinition(java.lang.String expression)
BeanDefinition
for the AspectJExpressionPointcut
class using
the supplied pointcut expression.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |