Class BeanMetadataAttributeAccessor

    • Constructor Detail

      • BeanMetadataAttributeAccessor

        public BeanMetadataAttributeAccessor()
    • Method Detail

      • setSource

        public void setSource(@Nullable
                              java.lang.Object source)
        Set the configuration source Object for this metadata element.

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

      • addMetadataAttribute

        public void addMetadataAttribute(BeanMetadataAttribute attribute)
        Add the given BeanMetadataAttribute to this accessor's set of attributes.
        attribute - the BeanMetadataAttribute object to register
      • getMetadataAttribute

        public BeanMetadataAttribute getMetadataAttribute(java.lang.String name)
        Look up the given BeanMetadataAttribute in this accessor's set of attributes.
        name - the name of the attribute
        the corresponding BeanMetadataAttribute object, or null if no such attribute defined
      • setAttribute

        public void setAttribute(java.lang.String name,
                                 java.lang.Object value)
        Description copied from interface: AttributeAccessor
        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.

        Specified by:
        setAttribute in interface AttributeAccessor
        setAttribute in class AttributeAccessorSupport
        name - the unique attribute key
        value - the attribute value to be attached