| org.springframework.core.AttributeAccessor
All known Subclasses: org.springframework.core.AttributeAccessorSupport,
AttributeAccessor | public interface AttributeAccessor (Code) | | Interface defining a generic contract for attaching and accessing metadata
to/from arbitrary objects.
author: Rob Harrop since: 2.0 |
attributeNames | String[] attributeNames()(Code) | | Return the names of all attributes.
|
getAttribute | Object getAttribute(String name)(Code) | | Get the value of the attribute identified by name .
Return null if the attribute doesn't exist.
Parameters: name - the unique attribute key the current value of the attribute, if any |
hasAttribute | boolean hasAttribute(String name)(Code) | | Return true if the attribute identified by name exists.
Otherwise return false .
Parameters: name - the unique attribute key |
removeAttribute | Object removeAttribute(String name)(Code) | | 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 the last value of the attribute, if any |
setAttribute | void setAttribute(String name, Object value)(Code) | | Set the attribute defined by name to the supplied value .
If value is null , the attribute is
AttributeAccessor.removeAttribute 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 Parameters: value - the attribute value to be attached |
|
|