BeanDefinition classes,
factoring out common properties of GenericBeanDefinition,
RootBeanDefinition, and ChildBeanDefinition.
The autowire constants match the ones defined in the
org.
interface.
GenericBeanDefinition, RootBeanDefinition, ChildBeanDefinition
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| public static final int | AUTOWIRE_AUTODETECT
Deprecated
as of Spring 3.0: If you are using mixed autowiring strategies,
use annotation-based autowiring for clearer demarcation of autowiring needs.
Constant that indicates determining an appropriate autowire strategy
through introspection of the bean class.
|
| public static final int | AUTOWIRE_BY_NAME
Constant that indicates autowiring bean properties by name. |
| public static final int | AUTOWIRE_BY_TYPE
Constant that indicates autowiring bean properties by type. |
| public static final int | AUTOWIRE_CONSTRUCTOR
Constant that indicates autowiring a constructor. |
| public static final int | AUTOWIRE_NO
Constant that indicates no external autowiring at all. |
| private boolean | |
| private int | |
| private volatile Object | |
| private ConstructorArgumentValues | |
| public static final int | DEPENDENCY_CHECK_ALL
Constant that indicates dependency checking for all properties (object references as well as "simple" properties). |
| public static final int | DEPENDENCY_CHECK_NONE
Constant that indicates no dependency check at all. |
| public static final int | DEPENDENCY_CHECK_OBJECTS
Constant that indicates dependency checking for object references. |
| public static final int | DEPENDENCY_CHECK_SIMPLE
Constant that indicates dependency checking for "simple" properties. |
| private int | |
| private String[] | |
| private String | |
| private String[] | |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| public static final String | INFER_METHOD
Constant that indicates the container should attempt to infer the
|
| private String[] | |
| private Supplier | |
| private Boolean | |
| private boolean | |
| private MethodOverrides | |
| private boolean | |
| public static final String | ORDER_ATTRIBUTE
The name of an attribute that can be
|
| public static final String | PREFERRED_CONSTRUCTORS_ATTRIBUTE
The name of an attribute that can be
|
| private boolean | |
| private MutablePropertyValues | |
| private final Map | |
| private Resource | |
| private int | |
| private String | |
| public static final String | SCOPE_DEFAULT
Constant for the default scope name: |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractBeanDefinition(ConstructorArgumentValues cargs, MutablePropertyValues pvs)
Create a new AbstractBeanDefinition with the given constructor argument values and property values. |
| protected | AbstractBeanDefinition(BeanDefinition
the original bean definition to copy from original)Create a new AbstractBeanDefinition as a deep copy of the given bean definition. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addQualifier(AutowireCandidateQualifier qualifier)
Register a qualifier to be used for autowire candidate resolution, keyed by the qualifier's type name. |
| public void | applyDefaults(BeanDefinitionDefaults
the default settings to apply defaults)Apply the provided default values to this bean. |
| public Object | |
| public abstract AbstractBeanDefinition | |
| public void | copyQualifiersFrom(AbstractBeanDefinition
the AbstractBeanDefinition to copy from source)Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides org. Indicates whether some other object is "equal to" this one. |
| private boolean | |
| private boolean | |
| public int | |
| public Class | Returns: the resolved bean class (nevernull)Return the specified class of the bean definition (assuming it is resolved already). |
| public String | getBeanClassName()
Implements org. Return the current bean class name of this bean definition. |
| public ConstructorArgumentValues | getConstructorArgumentValues()
Implements org. Return constructor argument values for this bean (never |
| public int | |
| public String[] | getDependsOn()
Implements org. Return the bean names that this bean depends on. |
| public String | getDescription()
Implements org. Return a human-readable description of this bean definition. |
| public String | getDestroyMethodName()
Implements org. Return the name of the destroy method (the first one in case of multiple methods). |
| public String[] | |
| public String | getFactoryBeanName()
Implements org. Return the factory bean name, if any. |
| public String | getFactoryMethodName()
Implements org. Return a factory method, if any. |
| public String | getInitMethodName()
Implements org. Return the name of the initializer method (the first one in case of multiple methods). |
| public String[] | |
| public Supplier | |
| public Boolean | Returns: the lazy-init flag if explicitly set, ornull otherwiseReturn whether this bean should be lazily initialized, i.e. not eagerly instantiated on startup. |
| public MethodOverrides | |
| public BeanDefinition | getOriginatingBeanDefinition()
Implements org. Return the originating BeanDefinition, or |
| public MutablePropertyValues | getPropertyValues()
Implements org. Return property values for this bean (never |
| public AutowireCandidateQualifier | |
| public Set | Returns: the Set ofAutowireCandidateQualifier objects.Return all registered qualifiers. |
| public ResolvableType | getResolvableType()
Implements org. Return a resolvable type for this bean definition. |
| public int | getResolvedAutowireMode()
Return the resolved autowire code, (resolving AUTOWIRE_AUTODETECT to AUTOWIRE_CONSTRUCTOR or AUTOWIRE_BY_TYPE). |
| public Resource | |
| public String | getResourceDescription()
Implements org. Return a description of the resource that this bean definition came from (for the purpose of showing context in case of errors). |
| public int | getRole()
Implements org. Return the role hint for this |
| public String | getScope()
Implements org. Return the name of the target scope for the bean. |
| public boolean | |
| public boolean | hasConstructorArgumentValues()
Overrides default org. Return if there are constructor argument values defined for this bean. |
| public int | hashCode()
Overrides org. Returns a hash code value for this object. |
| public boolean | |
| public boolean | hasPropertyValues()
Overrides default org. Return if there are property values defined for this bean. |
| public boolean | |
| public boolean | isAbstract()
Implements org. Return whether this bean is "abstract", i.e. not meant to be instantiated itself but rather just serving as parent for concrete child bean definitions. |
| public boolean | isAutowireCandidate()
Implements org. Return whether this bean is a candidate for getting autowired into some other bean. |
| public boolean | |
| public boolean | |
| public boolean | Returns: whether to apply lazy-init semantics (false by default)Implements org. Return whether this bean should be lazily initialized, i.e. not eagerly instantiated on startup. |
| public boolean | isLenientConstructorResolution()
Return whether to resolve constructors in lenient mode or in strict mode. |
| public boolean | |
| public boolean | isPrimary()
Implements org. Return whether this bean is a primary autowire candidate. |
| public boolean | isPrototype()
Implements org. Return whether this a Prototype, with an independent instance returned for each call. |
| public boolean | isSingleton()
Implements org. Return whether this a Singleton, with a single shared instance returned from all calls. |
| public boolean | isSynthetic()
Return whether this bean definition is 'synthetic', that is, not defined by the application itself. |
| public void | overrideFrom(BeanDefinition other)
Override settings in this bean definition (presumably a copied parent from a parent-child inheritance relationship) from the given bean definition (presumably the child). |
| protected void | prepareMethodOverride(MethodOverride
the MethodOverride object to validate mo)Validate and prepare the given method override. |
| public void | |
| public Class | Returns: the resolved bean classthe ClassLoader to use for resolving a (potential) class name classLoader)Determine the class of the wrapped bean, resolving it from a specified class name if necessary. |
| public void | setAbstract(boolean abstractFlag)
Set if this bean is "abstract", i.e. not meant to be instantiated itself but rather just serving as parent for concrete child bean definitions. |
| public void | setAutowireCandidate(boolean autowireCandidate)
Implements org. Set whether this bean is a candidate for getting autowired into some other bean. |
| public void | setAutowireMode(int
the autowire mode to set.
Must be one of the constants defined in this class. autowireMode)Set the autowire mode. |
| public void | |
| public void | setBeanClassName(String beanClassName)
Implements org. Specify the bean class name of this bean definition. |
| public void | setConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues)
Specify constructor argument values for this bean. |
| public void | setDependencyCheck(int
the code to set.
Must be one of the four constants defined in this class. dependencyCheck)Set the dependency check code. |
| public void | setDependsOn(String... dependsOn)
Implements org. Set the names of the beans that this bean depends on being initialized. |
| public void | setDescription(String description)
Implements org. Set a human-readable description of this bean definition. |
| public void | setDestroyMethodName(String destroyMethodName)
Implements org. Set the name of the destroy method. |
| public void | |
| public void | setEnforceDestroyMethod(boolean enforceDestroyMethod)
Specify whether the configured destroy method is the default. |
| public void | setEnforceInitMethod(boolean enforceInitMethod)
Specify whether the configured initializer method is the default. |
| public void | setFactoryBeanName(String factoryBeanName)
Implements org. Specify the factory bean to use, if any. |
| public void | setFactoryMethodName(String factoryMethodName)
Implements org. Specify a factory method, if any. |
| public void | setInitMethodName(String initMethodName)
Implements org. Set the name of the initializer method. |
| public void | |
| public void | setInstanceSupplier(Supplier<?> instanceSupplier)
Specify a callback for creating an instance of the bean, as an alternative to a declaratively specified factory method. |
| public void | setLazyInit(boolean lazyInit)
Implements org. Set whether this bean should be lazily initialized. |
| public void | setLenientConstructorResolution(boolean lenientConstructorResolution)
Specify whether to resolve constructors in lenient mode ( |
| public void | |
| public void | setNonPublicAccessAllowed(boolean nonPublicAccessAllowed)
Specify whether to allow access to non-public constructors and methods, for the case of externalized metadata pointing to those. |
| public void | setOriginatingBeanDefinition(BeanDefinition originatingBd)
Set the originating (e.g. decorated) BeanDefinition, if any. |
| public void | setPrimary(boolean primary)
Implements org. Set whether this bean is a primary autowire candidate. |
| public void | setPropertyValues(MutablePropertyValues propertyValues)
Specify property values for this bean, if any. |
| public void | setResource(Resource resource)
Set the resource that this bean definition came from (for the purpose of showing context in case of errors). |
| public void | setResourceDescription(String resourceDescription)
Set a description of the resource that this bean definition came from (for the purpose of showing context in case of errors). |
| public void | setRole(int role)
Implements org. Set the role hint for this |
| public void | setScope(String scope)
Implements org. Set the name of the target scope for the bean. |
| public void | setSynthetic(boolean synthetic)
Set whether this bean definition is 'synthetic', that is, not defined
by the application itself (for example, an infrastructure bean such
as a helper for auto-proxying, created through |
| public String | |
| public void |