Package org.springframework.beans
Class BeanMetadataAttributeAccessor
java.lang.Object
org.springframework.core.AttributeAccessorSupport
org.springframework.beans.BeanMetadataAttributeAccessor
- All Implemented Interfaces:
Serializable,BeanMetadataElement,org.springframework.core.AttributeAccessor
- Direct Known Subclasses:
AbstractBeanDefinition,AutowireCandidateQualifier,PropertyValue
public class BeanMetadataAttributeAccessor
extends org.springframework.core.AttributeAccessorSupport
implements BeanMetadataElement
Extension of
AttributeAccessorSupport,
holding attributes as BeanMetadataAttribute objects in order
to keep track of the definition source.- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetadataAttribute(BeanMetadataAttribute attribute) Add the given BeanMetadataAttribute to this accessor's set of attributes.getAttribute(String name) getMetadataAttribute(String name) Look up the given BeanMetadataAttribute in this accessor's set of attributes.Return the configuration sourceObjectfor this metadata element (may benull).removeAttribute(String name) voidsetAttribute(String name, Object value) voidSet the configuration sourceObjectfor this metadata element.Methods inherited from class org.springframework.core.AttributeAccessorSupport
attributeNames, computeAttribute, copyAttributesFrom, equals, hasAttribute, hashCode
-
Constructor Details
-
BeanMetadataAttributeAccessor
public BeanMetadataAttributeAccessor()
-
-
Method Details
-
setSource
Set the configuration sourceObjectfor this metadata element.The exact type of the object will depend on the configuration mechanism used.
-
getSource
Description copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
getSourcein interfaceBeanMetadataElement
-
addMetadataAttribute
Add the given BeanMetadataAttribute to this accessor's set of attributes.- Parameters:
attribute- the BeanMetadataAttribute object to register
-
getMetadataAttribute
Look up the given BeanMetadataAttribute in this accessor's set of attributes.- Parameters:
name- the name of the attribute- Returns:
- the corresponding BeanMetadataAttribute object,
or
nullif no such attribute defined
-
setAttribute
- Specified by:
setAttributein interfaceorg.springframework.core.AttributeAccessor- Overrides:
setAttributein classorg.springframework.core.AttributeAccessorSupport
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.core.AttributeAccessor- Overrides:
getAttributein classorg.springframework.core.AttributeAccessorSupport
-
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.core.AttributeAccessor- Overrides:
removeAttributein classorg.springframework.core.AttributeAccessorSupport
-