public class

BeanMetadataAttributeAccessor

extends AttributeAccessorSupport
implements BeanMetadataElement
java.lang.Object
   ↳ org.springframework.core.AttributeAccessorSupport
     ↳ org.springframework.beans.BeanMetadataAttributeAccessor
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Extension of AttributeAccessorSupport, holding attributes as BeanMetadataAttribute objects in order to keep track of the definition source.

Summary

Public Constructors
BeanMetadataAttributeAccessor()
Public Methods
void addMetadataAttribute(BeanMetadataAttribute attribute)
Add the given BeanMetadataAttribute to this accessor's set of attributes.
Object getAttribute(String name)
Get the value of the attribute identified by name.
BeanMetadataAttribute getMetadataAttribute(String name)
Look up the given BeanMetadataAttribute in this accessor's set of attributes.
Object getSource()
Return the configuration source Object for this metadata element (may be null).
Object removeAttribute(String name)
Remove the attribute identified by name and return its value.
void setAttribute(String name, Object value)
Set the attribute defined by name to the supplied value.
void setSource(Object source)
Set the configuration source Object for this metadata element.
[Expand]
Inherited Methods
From class org.springframework.core.AttributeAccessorSupport
From class java.lang.Object
From interface org.springframework.beans.BeanMetadataElement
From interface org.springframework.core.AttributeAccessor

Public Constructors

public BeanMetadataAttributeAccessor ()

Also: SpringBeans

Public Methods

public void addMetadataAttribute (BeanMetadataAttribute attribute)

Also: SpringBeans

Add the given BeanMetadataAttribute to this accessor's set of attributes.

Parameters
attribute the BeanMetadataAttribute object to register

public Object getAttribute (String name)

Also: SpringBeans

Get the value of the attribute identified by name. Return null if the attribute doesn't exist.

Parameters
name the unique attribute key
Returns
  • the current value of the attribute, if any

public BeanMetadataAttribute getMetadataAttribute (String name)

Also: SpringBeans

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 null if no such attribute defined

public Object getSource ()

Also: SpringBeans

Return the configuration source Object for this metadata element (may be null).

public Object removeAttribute (String name)

Also: SpringBeans

Remove the attribute identified by name and return its value. Return null if no attribute under name is found.

Parameters
name the unique attribute key
Returns
  • the last value of the attribute, if any

public void setAttribute (String name, Object value)

Also: SpringBeans

Set the attribute defined by name to the supplied value. If value is null, the attribute is removed.

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.

Parameters
name the unique attribute key
value the attribute value to be attached

public void setSource (Object source)

Also: SpringBeans

Set the configuration source Object for this metadata element.

The exact type of the object will depend on the configuration mechanism used.