org.springframework.data.config

## Class BeanComponentDefinitionBuilder

- java.lang.Object
- - org.springframework.data.config.BeanComponentDefinitionBuilder

    public class BeanComponentDefinitionBuilder
    extends Object

Helper to create `BeanComponentDefinition` more easily.

Author:
  Oliver Gierke

### Constructor Summary

Constructors
Constructor and Description
`BeanComponentDefinitionBuilder(Element defaultSource, ParserContext context)` Creates a new `BeanComponentDefinitionBuilder` using the given `Element` as default source and the given `ParserContext`.

### Method Summary

All Methods Instance Methods Concrete Methods
`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 `Element`s 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 `Element`s 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: