spring源码 RootBeanDefinition类的根接口AttributeAccessor

/**
 * Interface defining a generic contract for attaching and accessing metadata
 * to/from arbitrary objects.
 *定义用于附加和访问元数据的通用的接口,来自任意对象
 * @author Rob Harrop
 * @since 2.0
 */
public interface AttributeAccessor {

    /**
     * Set the attribute defined by {@code name} to the supplied    {@code value}.
    将name的属性值设置为value*/
    void setAttribute(String name, Object value);

    /**
     * Get the value of the attribute identified by {@code name}.
     * Return {@code null} if the attribute doesn't exist.
   获取name的属性值,如果该属性不存在,则返回Null*/
    Object getAttribute(String name);

    /**
     * Remove the attribute identified by {@code name} and return its value.
     * Return {@code null} if no attribute under {@code name} is found.
     删除name的属性值,如果找不到Nmae属性的值则返回Null*/
    Object removeAttribute(String name);

    /**
     * Return {@code true} if the attribute identified by {@code name} exists.
    如果name属性值存在则返回true,否者返回false*/
    boolean hasAttribute(String name);

    /**
     * Return the names of all attributes.
    返回所有的属性名称
*/ String[] attributeNames(); }

 

相关文章:

  • 2021-11-13
  • 2021-12-06
  • 2021-08-08
  • 2022-12-23
  • 2022-01-06
  • 2021-10-11
  • 2021-10-06
  • 2021-10-08
猜你喜欢
  • 2021-08-24
  • 2021-12-16
  • 2022-12-23
  • 2021-08-27
  • 2021-10-10
  • 2021-11-27
  • 2021-09-12
相关资源
相似解决方案