org.springframework.beans.factory.parsing

## 类 CompositeComponentDefinition

- java.lang.Object
- - org.springframework.beans.factory.parsing.AbstractComponentDefinition
  - - org.springframework.beans.factory.parsing.CompositeComponentDefinition

- 所有已实现的接口:
    BeanMetadataElement, ComponentDefinition

      public class CompositeComponentDefinition
      extends AbstractComponentDefinition

  `ComponentDefinition` implementation that holds one or more nested `ComponentDefinition` instances, aggregating them into a named group of components.
  从以下版本开始:
    2.0.1
  作者:
    Juergen Hoeller
  另请参阅:
    `getNestedComponents()`

- - ### 构造器概要

    构造器
    构造器和说明
    `CompositeComponentDefinition(String name, Object source)` Create a new CompositeComponentDefinition.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addNestedComponent(ComponentDefinition component)` Add the given component as nested element of this composite component.
    `String` | `getName()` Get the user-visible name of this `ComponentDefinition`.
    `ComponentDefinition[]` | `getNestedComponents()` Return the nested components that this composite component holds.
    `Object` | `getSource()` 获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).

    - ### 从类继承的方法 org.springframework.beans.factory.parsing.AbstractComponentDefinition

      `getBeanDefinitions, getBeanReferences, getDescription, getInnerBeanDefinitions, toString`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### CompositeComponentDefinition

          public CompositeComponentDefinition(String name,
                                              @Nullable
                                              Object source)

      Create a new CompositeComponentDefinition.
      参数:
        `name` - the name of the composite component
        `source` - the source element that defines the root of the composite component

  - ### 方法详细资料

    - #### getName

          public String getName()

      从接口复制的说明: `ComponentDefinition`
      Get the user-visible name of this `ComponentDefinition`.

      This should link back directly to the corresponding configuration data for this component in a given context.

    - #### getSource

          @Nullable
          public Object getSource()

      从接口复制的说明: `BeanMetadataElement`
      获取源对象,可能返回null Return the configuration source `Object` for this metadata element (may be `null`).

    - #### addNestedComponent

          public void addNestedComponent(ComponentDefinition component)

      Add the given component as nested element of this composite component.
      参数:
        `component` - the nested component to add

    - #### getNestedComponents

          public ComponentDefinition[] getNestedComponents()

      Return the nested components that this composite component holds.
      返回:
        the array of nested components, or an empty array if none