Top Description Inners Fields Constructors Methods
org.springframework.cache.config

pack-priv Class CacheAdviceParser

extends AbstractSingleBeanDefinitionParser
Class Inheritance
Imports
java.util.ArrayList, .Collection, .List, org.w3c.dom.Element, org.springframework.beans.factory.config.TypedStringValue, org.springframework.beans.factory.parsing.ReaderContext, org.springframework.beans.factory.support.BeanDefinitionBuilder, .ManagedList, .ManagedMap, .RootBeanDefinition, org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser, .ParserContext, org.springframework.cache.interceptor.CacheEvictOperation, .CacheInterceptor, .CacheOperation, .CachePutOperation, .CacheableOperation, .NameMatchCacheOperationSource, org.springframework.lang.Nullable, org.springframework.util.StringUtils, org.springframework.util.xml.DomUtils

BeanDefinitionParser for the <tx:advice/> tag.
Authors
Costin Leau, Phillip Webb, Stephane Nicoll

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
CacheAdviceParser.Props

Simple, reusable class used for overriding defaults.

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
doParse(Element
the XML element being parsed
element
,
ParserContext
the object encapsulating the current state of the parsing process
parserContext
,
BeanDefinitionBuilder
used to define the BeanDefinition
builder
)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

private static String
getAttributeValue(Element element, String attributeName, String defaultValue)

protected Class<?>
getBeanClass(Element
the Element that is being parsed
element
)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Determine the bean class corresponding to the supplied Element.

private RootBeanDefinition
parseDefinitionSource(Element definition, ParserContext parserContext)

private List<RootBeanDefinition>
parseDefinitionsSources(List<Element> definitions, ParserContext parserContext)

Inherited from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser:
doParsegetBeanClassNamegetParentNameparseInternal

Field Detail

CACHE_EVICT_ELEMENTback to summary
private static final String CACHE_EVICT_ELEMENT
CACHE_PUT_ELEMENTback to summary
private static final String CACHE_PUT_ELEMENT
CACHEABLE_ELEMENTback to summary
private static final String CACHEABLE_ELEMENT
DEFS_ELEMENTback to summary
private static final String DEFS_ELEMENT
METHOD_ATTRIBUTEback to summary
private static final String METHOD_ATTRIBUTE

Constructor Detail

CacheAdviceParserback to summary
pack-priv CacheAdviceParser()

Method Detail

doParseback to summary
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.doParse.

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.doParse.

Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

The default implementation delegates to the doParse version without ParserContext argument.

Parameters
element:Element

the XML element being parsed

parserContext:ParserContext

the object encapsulating the current state of the parsing process

builder:BeanDefinitionBuilder

used to define the BeanDefinition

Annotations
@Override
getAttributeValueback to summary
private static String getAttributeValue(Element element, String attributeName, String defaultValue)
getBeanClassback to summary
protected Class<?> getBeanClass(Element element)

Overrides org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Doc from org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.getBeanClass.

Determine the bean class corresponding to the supplied Element.

Note that, for application classes, it is generally preferable to override getBeanClassName instead, in order to avoid a direct dependence on the bean implementation class. The BeanDefinitionParser and its NamespaceHandler can be used within an IDE plugin then, even if the application classes are not available on the plugin's classpath.

Parameters
element:Element

the Element that is being parsed

Returns:Class<?>

the Class of the bean that is being defined via parsing the supplied Element, or null if none

Annotations
@Override
parseDefinitionSourceback to summary
private RootBeanDefinition parseDefinitionSource(Element definition, ParserContext parserContext)
parseDefinitionsSourcesback to summary
private List<RootBeanDefinition> parseDefinitionsSources(List<Element> definitions, ParserContext parserContext)
org.springframework.cache.config back to summary

private Class CacheAdviceParser.Props

extends Object
Class Inheritance

Simple, reusable class used for overriding defaults.

Field Summary

Modifier and TypeField and Description
private final String
private String[]
private final String
private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
Props(Element root)

Method Summary

Modifier and TypeMethod and Description
pack-priv <T extends CacheOperation.Builder> T
merge(Element element, ReaderContext readerCtx, T builder)

pack-priv String
merge(Element element, ReaderContext readerCtx)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheManagerback to summary
private final String cacheManager
cachesback to summary
private String[] caches
Annotations
@Nullable
conditionback to summary
private final String condition
keyback to summary
private final String key
keyGeneratorback to summary
private final String keyGenerator
methodback to summary
private final String method

Constructor Detail

Propsback to summary
pack-priv Props(Element root)

Method Detail

mergeback to summary
pack-priv <T extends CacheOperation.Builder> T merge(Element element, ReaderContext readerCtx, T builder)
mergeback to summary
pack-priv String merge(Element element, ReaderContext readerCtx)
Annotations
@Nullable