Class BeanProperty


  • public class BeanProperty
    extends java.lang.Object
    The class presenting the Property of Bean
    Since:
    1.0.0
    Author:
    Mercy
    • Constructor Summary

      Constructors 
      Constructor Description
      BeanProperty​(java.lang.String name, java.lang.Class<?> beanClass, java.beans.PropertyDescriptor descriptor)  
    • Constructor Detail

      • BeanProperty

        public BeanProperty​(@Nonnull
                            java.lang.String name,
                            @Nonnull
                            java.lang.Class<?> beanClass,
                            @Nonnull
                            java.beans.PropertyDescriptor descriptor)
    • Method Detail

      • getName

        @Nonnull
        public java.lang.String getName()
      • getValue

        @Nullable
        public java.lang.Object getValue()
      • setValue

        public void setValue​(java.lang.Object value)
      • getBeanClass

        @Nonnull
        public java.lang.Class<?> getBeanClass()
      • getDescriptor

        @Nonnull
        public java.beans.PropertyDescriptor getDescriptor()
      • equals

        public boolean equals​(java.lang.Object o)
        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
      • of

        public static BeanProperty of​(@Nonnull
                                      java.lang.Object bean,
                                      @Nonnull
                                      java.lang.String propertyName)
        Create a BeanProperty instance
        Parameters:
        bean - bean instance
        propertyName - the name of bean property
        Returns:
        a BeanProperty instance
        Throws:
        java.lang.IllegalArgumentException - if the bean or propertyName is null