Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » core » [javadoc | source]
org.springframework.core
public interface: AttributeAccessor [javadoc | source]

All Known Implementing Classes:
    AnnotatedGenericBeanDefinition, AnnotatedBeanDefinition, BeanMetadataAttributeAccessor, PropertyValue, BeanDefinition, AbstractBeanDefinition, ChildBeanDefinition, ScannedGenericBeanDefinition, AttributeAccessorSupport, RootBeanDefinition, GenericBeanDefinition, AutowireCandidateQualifier

Interface defining a generic contract for attaching and accessing metadata to/from arbitrary objects.
Method from org.springframework.core.AttributeAccessor Summary:
attributeNames,   getAttribute,   hasAttribute,   removeAttribute,   setAttribute
Method from org.springframework.core.AttributeAccessor Detail:
 public String[] attributeNames()
    Return the names of all attributes.
 public Object getAttribute(String name)
    Get the value of the attribute identified by name. Return null if the attribute doesn't exist.
 public boolean hasAttribute(String name)
    Return true if the attribute identified by name exists. Otherwise return false.
 public Object removeAttribute(String name)
    Remove the attribute identified by name and return its value. Return null if no attribute under name is found.
 public  void setAttribute(String name,
    Object value)
    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.