net.sf.doolin.context.spring
Class AbstractDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
          extended by net.sf.doolin.context.spring.AbstractDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
Direct Known Subclasses:
LayoutManagerServiceParser, PropertiesDecorator, SimpleDefinitionParser, StringsDefinitionParser

public abstract class AbstractDefinitionParser
extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

Utility parser for beans.

Author:
Damien Coraboeuf

Field Summary
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
 
Constructor Summary
AbstractDefinitionParser()
           
 
Method Summary
protected  void delegate(Element element, String ns, String childName, AbstractDefinitionParser parser, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Delegates the parsing of the current element to a child element.
 void doParse(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Changes scope to public.
protected  void setAttributeAsProperty(Element element, String attribute, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the attribute as property.
protected  void setAttributeAsProperty(Element element, String attribute, String property, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the attribute as property.
protected  void setAttributeAsReference(Element element, String attribute, String property, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the attribute as a reference.
protected  void setChildrenAsListProperty(Element element, String name, String propertyName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the elements as a list property.
protected  void setElementAsProperty(Element element, String name, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the element as property.
protected  void setElementAsProperty(Element element, String name, String propertyName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the element as property.
protected  void setListAsProperty(Element element, String name, String propertyName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the list as property.
protected  void setListStringAsProperty(Element element, String name, String propertyName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the list of String as property.
protected  void setMapAsProperty(Element element, String name, String propertyName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets the map as property.
protected  void setPropertyValue(Element element, String propertyName, String propertyValue, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Sets a property value
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClass, getBeanClassName, getParentName, parseInternal
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDefinitionParser

public AbstractDefinitionParser()
Method Detail

delegate

protected void delegate(Element element,
                        String ns,
                        String childName,
                        AbstractDefinitionParser parser,
                        org.springframework.beans.factory.xml.ParserContext context,
                        org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Delegates the parsing of the current element to a child element.

Parameters:
element - Current element
ns - Namespace URI for the child element
childName - Name of the child element
parser - Parser to apply
context - Parsing context
builder - Current builder

doParse

public void doParse(Element element,
                    org.springframework.beans.factory.xml.ParserContext parserContext,
                    org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Changes scope to public.

Overrides:
doParse in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

setAttributeAsProperty

protected void setAttributeAsProperty(Element element,
                                      String attribute,
                                      org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the attribute as property.

Parameters:
element - the element
attribute - the attribute
builder - the builder

setAttributeAsProperty

protected void setAttributeAsProperty(Element element,
                                      String attribute,
                                      String property,
                                      org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the attribute as property.

Parameters:
element - the element
attribute - the attribute
property - the property
builder - the builder

setAttributeAsReference

protected void setAttributeAsReference(Element element,
                                       String attribute,
                                       String property,
                                       org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the attribute as a reference.

Parameters:
element - the element
attribute - the attribute
property - the property
builder - the builder

setChildrenAsListProperty

protected void setChildrenAsListProperty(Element element,
                                         String name,
                                         String propertyName,
                                         org.springframework.beans.factory.xml.ParserContext context,
                                         org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the elements as a list property.

Parameters:
element - the element
name - the name of the child
propertyName - the property that contains the list
context - the context
builder - the builder

setElementAsProperty

protected void setElementAsProperty(Element element,
                                    String name,
                                    org.springframework.beans.factory.xml.ParserContext context,
                                    org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the element as property.

Parameters:
element - the element
name - the name
context - the context
builder - the builder

setElementAsProperty

protected void setElementAsProperty(Element element,
                                    String name,
                                    String propertyName,
                                    org.springframework.beans.factory.xml.ParserContext context,
                                    org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the element as property.

Parameters:
element - the element
name - the name
propertyName - the property name
context - the context
builder - the builder

setListAsProperty

protected void setListAsProperty(Element element,
                                 String name,
                                 String propertyName,
                                 org.springframework.beans.factory.xml.ParserContext context,
                                 org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the list as property.

Parameters:
element - the element
name - the name
propertyName - the property name
context - the context
builder - the builder

setListStringAsProperty

protected void setListStringAsProperty(Element element,
                                       String name,
                                       String propertyName,
                                       org.springframework.beans.factory.xml.ParserContext context,
                                       org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the list of String as property.

Parameters:
element - the element
name - the name
propertyName - the property name
context - the context
builder - the builder

setMapAsProperty

protected void setMapAsProperty(Element element,
                                String name,
                                String propertyName,
                                org.springframework.beans.factory.xml.ParserContext context,
                                org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets the map as property.

Parameters:
element - the element
name - the name
propertyName - the property name
context - the context
builder - the builder

setPropertyValue

protected void setPropertyValue(Element element,
                                String propertyName,
                                String propertyValue,
                                org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets a property value

Parameters:
element - the element
propertyName - the property name
propertyValue - the property value
builder - the builder


Copyright © 2011. All Rights Reserved.