Spring源码分析-IOC之AttributeAccessor

AttributeAccessor定义用于附加和访问元数据的通用的接口,来自任意对象
public interface AttributeAccessor {

	//设置属性的值
	void setAttribute(String name, Object value);

	//获得指定属性名称的值,如果不存在返回null
	Object getAttribute(String name);

	//删除指定的name的属性,如果不存在则返回null
	Object removeAttribute(String name);

    //判断指定的属性名称是否存在,注意属性名称必须是唯一的
	boolean hasAttribute(String name);

	//得到所有属性的名称
	String[] attributeNames();

}

猜你喜欢

转载自blog.csdn.net/cgsyck/article/details/88578392