Class BeanMetadataAttributeAccessor
java.lang.Object
org.springframework.core.AttributeAccessorSupport
org.springframework.beans.BeanMetadataAttributeAccessor
- All Implemented Interfaces:
- Serializable,- BeanMetadataElement,- AttributeAccessor
- Direct Known Subclasses:
- AbstractBeanDefinition,- AutowireCandidateQualifier,- PropertyValue
public class BeanMetadataAttributeAccessor
extends 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddMetadataAttribute(BeanMetadataAttribute attribute) Add the given BeanMetadataAttribute to this accessor's set of attributes.getAttribute(String name) Get the value of the attribute identified byname.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) Remove the attribute identified bynameand return its value.voidsetAttribute(String name, @Nullable Object value) Set the attribute defined bynameto the suppliedvalue.voidSet the configuration sourceObjectfor this metadata element.Methods inherited from class org.springframework.core.AttributeAccessorSupportattributeNames, computeAttribute, copyAttributesFrom, equals, hasAttribute, hashCode
- 
Constructor Details- 
BeanMetadataAttributeAccessorpublic BeanMetadataAttributeAccessor()
 
- 
- 
Method Details- 
setSource
- 
getSourceDescription copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
- getSourcein interface- BeanMetadataElement
 
- 
addMetadataAttributeAdd the given BeanMetadataAttribute to this accessor's set of attributes.- Parameters:
- attribute- the BeanMetadataAttribute object to register
 
- 
getMetadataAttributeLook 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
 
- 
setAttributeDescription copied from interface:AttributeAccessorSet the attribute defined bynameto the suppliedvalue.If valueisnull, the attribute isremoved.In general, users should take care to prevent overlaps with other metadata attributes by using fully-qualified names, perhaps using class or package names as prefix. - Specified by:
- setAttributein interface- AttributeAccessor
- Overrides:
- setAttributein class- AttributeAccessorSupport
- Parameters:
- name- the unique attribute key
- value- the attribute value to be attached
 
- 
getAttributeDescription copied from interface:AttributeAccessorGet the value of the attribute identified byname.Return nullif the attribute doesn't exist.- Specified by:
- getAttributein interface- AttributeAccessor
- Overrides:
- getAttributein class- AttributeAccessorSupport
- Parameters:
- name- the unique attribute key
- Returns:
- the current value of the attribute, if any
 
- 
removeAttributeDescription copied from interface:AttributeAccessorRemove the attribute identified bynameand return its value.Return nullif no attribute undernameis found.- Specified by:
- removeAttributein interface- AttributeAccessor
- Overrides:
- removeAttributein class- AttributeAccessorSupport
- Parameters:
- name- the unique attribute key
- Returns:
- the last value of the attribute, if any
 
 
-