org.springframework.beans

Class BeanMetadataAttribute

  • java.lang.Object
    • org.springframework.beans.BeanMetadataAttribute
  • All Implemented Interfaces:
    BeanMetadataElement


    public class BeanMetadataAttribute
    extends java.lang.Object
    implements BeanMetadataElement
    Holder for a key-value style attribute that is part of a bean definition. Keeps track of the definition source in addition to the key-value pair.
    Since:
    2.5
    Author:
    Juergen Hoeller
    • Constructor Summary

      Constructors 
      Constructor and Description
      BeanMetadataAttribute(java.lang.String name, java.lang.Object value)
      Create a new AttributeValue instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object other) 
      java.lang.String getName()
      Return the name of the attribute.
      java.lang.Object getSource()
      Return the configuration source Object for this metadata element (may be null).
      java.lang.Object getValue()
      Return the value of the attribute.
      int hashCode() 
      void setSource(java.lang.Object source)
      Set the configuration source Object for this metadata element.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BeanMetadataAttribute

        public BeanMetadataAttribute(java.lang.String name,
                                     @Nullable
                                     java.lang.Object value)
        Create a new AttributeValue instance.
        Parameters:
        name - the name of the attribute (never null)
        value - the value of the attribute (possibly before type conversion)
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of the attribute.
      • getValue

        @Nullable
        public java.lang.Object getValue()
        Return the value of the attribute.
      • 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.

      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object