Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.beans.factory.support
Class RootBeanDefinition

    java.lang.Object
      org.springframework.core.AttributeAccessorSupport
          org.springframework.beans.factory.support.AbstractBeanDefinition
              org.springframework.beans.factory.support.RootBeanDefinition

All Implemented Interfaces:
  Serializable, BeanMetadataElement, BeanDefinition, AttributeAccessor

    public class RootBeanDefinition

extends AbstractBeanDefinition

Root bean definitions are the most common type of bean definition. They do not derive from a parent bean definition, and usually have a class plus optionally constructor argument values and property values.

Note that root bean definitions do not have to specify a bean class: This can be useful for deriving childs from such definitions, each with its own bean class but inheriting common property values and other settings.

Author:
  Rod Johnson, Juergen Hoeller
See Also:
  `ChildBeanDefinition`, Serialized Form

Field Summary

Fields inherited from class org.springframework.beans.factory.support.AbstractBeanDefinition
`AUTOWIRE_AUTODETECT, AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_CONSTRUCTOR, AUTOWIRE_NO, DEPENDENCY_CHECK_ALL, DEPENDENCY_CHECK_NONE, DEPENDENCY_CHECK_OBJECTS, DEPENDENCY_CHECK_SIMPLE`

Fields inherited from interface org.springframework.beans.factory.config.BeanDefinition
`ROLE_APPLICATION, ROLE_INFRASTRUCTURE, ROLE_SUPPORT, SCOPE_PROTOTYPE, SCOPE_SINGLETON`

Constructor Summary
`RootBeanDefinition()` Create a new RootBeanDefinition, to be configured through its bean properties and configuration methods.
`RootBeanDefinition(Class beanClass)` Create a new RootBeanDefinition for a singleton.
`RootBeanDefinition(Class beanClass, boolean singleton)` Create a new RootBeanDefinition with the given singleton status.
`RootBeanDefinition(Class beanClass, ConstructorArgumentValues cargs, MutablePropertyValues pvs)` Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.
`RootBeanDefinition(Class beanClass, int autowireMode)` Create a new RootBeanDefinition for a singleton, using the given autowire mode.
`RootBeanDefinition(Class beanClass, int autowireMode, boolean dependencyCheck)` Create a new RootBeanDefinition for a singleton, using the given autowire mode.
`RootBeanDefinition(Class beanClass, MutablePropertyValues pvs)` Create a new RootBeanDefinition for a singleton, providing property values.
`RootBeanDefinition(Class beanClass, MutablePropertyValues pvs, boolean singleton)` Create a new RootBeanDefinition with the given singleton status, providing property values.
`RootBeanDefinition(RootBeanDefinition original)` Create a new RootBeanDefinition as deep copy of the given bean definition.
`RootBeanDefinition(String beanClassName, ConstructorArgumentValues cargs, MutablePropertyValues pvs)` Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.

Method Summary
`boolean` | `equals(Object other)`
`String` | `toString()`

Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinition
`getAutowireMode, getBeanClass, getBeanClassName, getConstructorArgumentValues, getDependencyCheck, getDependsOn, getDestroyMethodName, getFactoryBeanName, getFactoryMethodName, getInitMethodName, getMethodOverrides, getPropertyValues, getResolvedAutowireMode, getResourceDescription, getRole, getScope, getSource, hasBeanClass, hasConstructorArgumentValues, hashCode, isAbstract, isAutowireCandidate, isEnforceDestroyMethod, isEnforceInitMethod, isLazyInit, isPrototype, isSingleton, isSynthetic, overrideFrom, prepareMethodOverride, prepareMethodOverrides, resolveBeanClass, setAbstract, setAutowireCandidate, setAutowireMode, setBeanClass, setBeanClassName, setConstructorArgumentValues, setDependencyCheck, setDependsOn, setDestroyMethodName, setEnforceDestroyMethod, setEnforceInitMethod, setFactoryBeanName, setFactoryMethodName, setInitMethodName, setLazyInit, setMethodOverrides, setPropertyValues, setResourceDescription, setRole, setScope, setSingleton, setSource, setSynthetic, validate`

Methods inherited from class org.springframework.core.AttributeAccessorSupport
`attributeNames, copyAttributesFrom, getAttribute, hasAttribute, removeAttribute, setAttribute`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.springframework.core.AttributeAccessor
`attributeNames, getAttribute, hasAttribute, removeAttribute, setAttribute`

Constructor Detail

### RootBeanDefinition

    public RootBeanDefinition()

  Create a new RootBeanDefinition, to be configured through its bean properties and configuration methods.

  See Also:
    `AbstractBeanDefinition.setBeanClass(java.lang.Class)`, `AbstractBeanDefinition.setBeanClassName(java.lang.String)`, `AbstractBeanDefinition.setSingleton(boolean)`, `AbstractBeanDefinition.setAutowireMode(int)`, `AbstractBeanDefinition.setDependencyCheck(int)`, `AbstractBeanDefinition.setConstructorArgumentValues(org.springframework.beans.factory.config.ConstructorArgumentValues)`, `AbstractBeanDefinition.setPropertyValues(org.springframework.beans.MutablePropertyValues)`

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass)

  Create a new RootBeanDefinition for a singleton.

  Parameters:
    `beanClass` - the class of the bean to instantiate

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              boolean singleton)

  Create a new RootBeanDefinition with the given singleton status.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `singleton` - the singleton status of the bean

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              int autowireMode)

  Create a new RootBeanDefinition for a singleton, using the given autowire mode.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `autowireMode` - by name or type, using the constants in this interface

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              int autowireMode,
                              boolean dependencyCheck)

  Create a new RootBeanDefinition for a singleton, using the given autowire mode.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `autowireMode` - by name or type, using the constants in this interface
    `dependencyCheck` - whether to perform a dependency check for objects (not applicable to autowiring a constructor, thus ignored there)

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              MutablePropertyValues pvs)

  Create a new RootBeanDefinition for a singleton, providing property values.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `pvs` - the property values to apply

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              MutablePropertyValues pvs,
                              boolean singleton)

  Create a new RootBeanDefinition with the given singleton status, providing property values.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `pvs` - the property values to apply
    `singleton` - the singleton status of the bean

### RootBeanDefinition

    public RootBeanDefinition(Class beanClass,
                              ConstructorArgumentValues cargs,
                              MutablePropertyValues pvs)

  Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.

  Parameters:
    `beanClass` - the class of the bean to instantiate
    `cargs` - the constructor argument values to apply
    `pvs` - the property values to apply

### RootBeanDefinition

    public RootBeanDefinition(String beanClassName,
                              ConstructorArgumentValues cargs,
                              MutablePropertyValues pvs)

  Create a new RootBeanDefinition for a singleton, providing constructor arguments and property values.

  Takes a bean class name to avoid eager loading of the bean class.

  Parameters:
    `beanClassName` - the name of the class to instantiate
    `cargs` - the constructor argument values to apply
    `pvs` - the property values to apply

### RootBeanDefinition

    public RootBeanDefinition(RootBeanDefinition original)

  Create a new RootBeanDefinition as deep copy of the given bean definition.

  Parameters:
    `original` - the original bean definition to copy from

Method Detail

### equals

    public boolean equals(Object other)

  Overrides:
    `equals` in class `AbstractBeanDefinition`

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractBeanDefinition`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2007 The Spring Framework.