public class BeanMetadataAttributeAccessor extends org.springframework.core.AttributeAccessorSupport implements BeanMetadataElement
AttributeAccessorSupport
,
holding attributes as BeanMetadataAttribute
objects in order
to keep track of the definition source.Constructor and Description |
---|
BeanMetadataAttributeAccessor() |
Modifier and Type | Method and Description |
---|---|
void |
addMetadataAttribute(BeanMetadataAttribute attribute)
Add the given BeanMetadataAttribute to this accessor's set of attributes.
|
java.lang.Object |
getAttribute(java.lang.String name) |
BeanMetadataAttribute |
getMetadataAttribute(java.lang.String name)
Look up the given BeanMetadataAttribute in this accessor's set of attributes.
|
java.lang.Object |
getSource()
Return the configuration source
Object for this metadata element
(may be null ). |
java.lang.Object |
removeAttribute(java.lang.String name) |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setSource(java.lang.Object source)
Set the configuration source
Object for this metadata element. |
public void setSource(@Nullable java.lang.Object source)
Object
for this metadata element.
The exact type of the object will depend on the configuration mechanism used.
@Nullable public java.lang.Object getSource()
BeanMetadataElement
Object
for this metadata element
(may be null
).getSource
in interface BeanMetadataElement
public void addMetadataAttribute(BeanMetadataAttribute attribute)
attribute
- the BeanMetadataAttribute object to register@Nullable public BeanMetadataAttribute getMetadataAttribute(java.lang.String name)
name
- the name of the attributenull
if no such attribute definedpublic void setAttribute(java.lang.String name, @Nullable java.lang.Object value)
setAttribute
in interface org.springframework.core.AttributeAccessor
setAttribute
in class org.springframework.core.AttributeAccessorSupport
@Nullable public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface org.springframework.core.AttributeAccessor
getAttribute
in class org.springframework.core.AttributeAccessorSupport
@Nullable public java.lang.Object removeAttribute(java.lang.String name)
removeAttribute
in interface org.springframework.core.AttributeAccessor
removeAttribute
in class org.springframework.core.AttributeAccessorSupport