Package io.microsphere.beans
Class BeanProperty
- java.lang.Object
-
- io.microsphere.beans.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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.Class<?>
getBeanClass()
java.beans.PropertyDescriptor
getDescriptor()
java.lang.String
getName()
java.lang.Object
getValue()
int
hashCode()
static BeanProperty
of(java.lang.Object bean, java.lang.String propertyName)
Create aBeanProperty
instancevoid
setValue(java.lang.Object value)
java.lang.String
toString()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
of
public static BeanProperty of(@Nonnull java.lang.Object bean, @Nonnull java.lang.String propertyName)
Create aBeanProperty
instance- Parameters:
bean
- bean instancepropertyName
- the name of bean property- Returns:
- a
BeanProperty
instance - Throws:
java.lang.IllegalArgumentException
- if the bean or propertyName is null
-
-