org.springframework.data.config
Class BeanComponentDefinitionBuilder

java.lang.Object
  extended by org.springframework.data.config.BeanComponentDefinitionBuilder

public class BeanComponentDefinitionBuilder
extends Object

Helper to create BeanComponentDefinition more easily.

Author:
Oliver Gierke

Constructor Summary
BeanComponentDefinitionBuilder(Element defaultSource, org.springframework.beans.factory.xml.ParserContext context)
          Creates a new BeanComponentDefinitionBuilder using the given Element as default source and the given ParserContext.
 
Method Summary
 org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          Creates a BeanComponentDefinition from the given BeanDefinitionBuilder.
 org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name)
          Creates a BeanComponentDefinition from the given BeanDefinitionBuilder using the given name.
 org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name, Object rawSource)
          Creates a new BeanComponentDefinition from the given BeanDefinitionBuilder using the given name and raw source object.
 org.springframework.beans.factory.parsing.BeanComponentDefinition getComponentIdButFallback(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String fallback)
          Creates a BeanComponentDefinition from the given BeanDefinitionBuilder and inspects the backing Elements id attribute for a name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanComponentDefinitionBuilder

public BeanComponentDefinitionBuilder(Element defaultSource,
                                      org.springframework.beans.factory.xml.ParserContext context)
Creates a new BeanComponentDefinitionBuilder using the given Element as default source and the given ParserContext.

Parameters:
defaultSource - must not be null.
context - must not be null.
Method Detail

getComponent

public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Creates a BeanComponentDefinition from the given BeanDefinitionBuilder. Will generate a bean name.

Parameters:
builder - must not be null.
Returns:

getComponentIdButFallback

public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponentIdButFallback(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
                                                                                                   String fallback)
Creates a BeanComponentDefinition from the given BeanDefinitionBuilder and inspects the backing Elements id attribute for a name. It will use this one if found or the given fallback if not.

Parameters:
builder - must not be null.
fallback - must not be null or empty.
Returns:

getComponent

public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
                                                                                      String name)
Creates a BeanComponentDefinition from the given BeanDefinitionBuilder using the given name.

Parameters:
builder - must not be null.
name - must not be null or empty.
Returns:

getComponent

public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
                                                                                      String name,
                                                                                      Object rawSource)
Creates a new BeanComponentDefinition from the given BeanDefinitionBuilder using the given name and raw source object.

Parameters:
builder - must not be null.
name - must not be null.
rawSource -
Returns:


Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.