Class BeanMetadataAttribute

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

public class BeanMetadataAttribute extends 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 Details

    • BeanMetadataAttribute

      public BeanMetadataAttribute(String name, @Nullable 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 Details

    • getName

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

      @Nullable public Object getValue()
      Return the value of the attribute.
    • setSource

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

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

    • getSource

      @Nullable public Object getSource()
      Description copied from interface: BeanMetadataElement
      Return the configuration source Object for this metadata element (may be null).
      Specified by:
      getSource in interface BeanMetadataElement
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object