Spring Data Core

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, ParserContext context)
          Creates a new BeanComponentDefinitionBuilder using the given Element as default source and the given ParserContext.
 
Method Summary
 BeanComponentDefinition getComponent(BeanDefinitionBuilder builder)
          Creates a BeanComponentDefinition from the given BeanDefinitionBuilder.
 BeanComponentDefinition getComponent(BeanDefinitionBuilder builder, String name)
          Creates a BeanComponentDefinition from the given BeanDefinitionBuilder using the given name.
 BeanComponentDefinition getComponent(BeanDefinitionBuilder builder, String name, Object rawSource)
          Creates a new BeanComponentDefinition from the given BeanDefinitionBuilder using the given name and raw source object.
 BeanComponentDefinition getComponentIdButFallback(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,
                                      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 BeanComponentDefinition getComponent(BeanDefinitionBuilder builder)
Creates a BeanComponentDefinition from the given BeanDefinitionBuilder. Will generate a bean name.

Parameters:
builder - must not be null.
Returns:

getComponentIdButFallback

public BeanComponentDefinition getComponentIdButFallback(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 BeanComponentDefinition getComponent(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 BeanComponentDefinition getComponent(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:

Spring Data Core

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