Package io.microsphere.beans
Class BeanProperty
- java.lang.Object
-
- io.microsphere.beans.BeanProperty
-
public class BeanProperty extends java.lang.ObjectThe 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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Class<?>getBeanClass()java.beans.PropertyDescriptorgetDescriptor()java.lang.StringgetName()java.lang.ObjectgetValue()inthashCode()static BeanPropertyof(java.lang.Object bean, java.lang.String propertyName)Create aBeanPropertyinstancevoidsetValue(java.lang.Object value)java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
of
public static BeanProperty of(@Nonnull java.lang.Object bean, @Nonnull java.lang.String propertyName)
Create aBeanPropertyinstance- Parameters:
bean- bean instancepropertyName- the name of bean property- Returns:
- a
BeanPropertyinstance - Throws:
java.lang.IllegalArgumentException- if the bean or propertyName is null
-
-