Class BeanPropertyValue

java.lang.Object
org.apache.juneau.commons.bean.BeanPropertyValue
All Implemented Interfaces:
Comparable<BeanPropertyValue>

public class BeanPropertyValue extends Object implements Comparable<BeanPropertyValue>
Represents a simple bean property value and the meta-data associated with it.
Thread safety
Instances are immutable and thread-safe.
  • Constructor Details

    • BeanPropertyValue

      public BeanPropertyValue(BeanPropertyMeta pMeta, String name, Object value, Throwable thrown)
      Constructor.
      Parameters:
      pMeta - The bean property metadata.
      name - The bean property name.
      value - The bean property value. Can be null.
      thrown - The exception thrown by calling the property getter. Can be null if no exception was thrown.
  • Method Details

    • compareTo

      public int compareTo(BeanPropertyValue o)
      Specified by:
      compareTo in interface Comparable<BeanPropertyValue>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public final BeanInfo<?> getBeanInfo()
      Returns the BeanInfo of the bean property.

      Returns the bean-modeling-side SPI type (BeanInfo). Marshalling-side callers that need the ClassMeta narrowing must cast — the concrete instance in-tree is always a ClassMeta.

      Returns:
      The bean property type info.
    • getMeta

      public final BeanPropertyMeta getMeta()
      Returns the bean property metadata.
      Returns:
      The bean property metadata.
    • getName

      public final String getName()
      Returns the bean property name.
      Returns:
      The bean property name.
    • getThrown

      public final Throwable getThrown()
      Returns the exception thrown by calling the property getter.
      Returns:
      The exception thrown by calling the property getter.
    • getValue

      public final Object getValue()
      Returns the bean property value.
      Returns:
      The bean property value.
    • properties

      Returns a property map view of this object.
      Returns:
      A property map containing the name, value, and type of this bean property.
    • toString

      public String toString()
      Overrides:
      toString in class Object