public class Property extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Property.PropertyQuery |
| Modifier and Type | Field and Description |
|---|---|
protected Object |
bean |
protected boolean |
bound |
protected boolean |
constrained |
protected String |
displayName |
protected boolean |
expret |
protected boolean |
hidden |
protected String |
htmlDescription |
protected String |
name |
protected boolean |
notNull |
protected boolean |
preffered |
protected PropertyDescriptor |
propertyDescriptor |
protected Class<?> |
propertyEditorClass |
protected Class |
propertyType |
protected Func0 |
readFn |
protected Method |
readMethod |
protected Boolean |
readOnly |
protected Boolean |
readOnlyDescent |
protected String |
shortDescription |
protected UiBean |
uiBean |
protected static WeakHashMap<PropertyDescriptor,Boolean> |
uiBeanApplied |
protected Func1 |
writeFn |
protected Method |
writeMethod |
| Constructor and Description |
|---|
Property()
Конструктор по умолчанию
|
Property(Object bean,
PropertyDescriptor src)
Конструктор
|
Property(Property src)
Конструктор копирования
|
Property(String name,
Class type,
Func0 read,
Func1 write)
Конструктор
|
protected static final WeakHashMap<PropertyDescriptor,Boolean> uiBeanApplied
protected UiBean uiBean
protected PropertyDescriptor propertyDescriptor
protected Object bean
protected Func0 readFn
protected Func1 writeFn
protected Boolean readOnly
protected Boolean readOnlyDescent
protected boolean notNull
protected Class propertyType
protected Method readMethod
protected Method writeMethod
protected boolean bound
protected boolean constrained
protected Class<?> propertyEditorClass
protected String name
protected String displayName
protected boolean expret
protected boolean hidden
protected boolean preffered
protected String shortDescription
protected String htmlDescription
public Property()
public Property(String name, Class type, Func0 read, Func1 write)
name - Имя свойстваtype - Тип свойстваread - Чтениеwrite - Записьpublic Property(Property src)
src - образец для копированияpublic Property(Object bean, PropertyDescriptor src)
bean - исходный объект владелец свойстваsrc - Описание свойстваpublic String getPropertyName()
public UiBean getUiBean()
public void setUiBean(UiBean uiBean)
public PropertyDescriptor getPropertyDescriptor()
public void setPropertyDescriptor(PropertyDescriptor propertyDescriptor)
public Object getBean()
public void setBean(Object bean)
bean - владелец свойства (объект)public Func0 getReadFn()
public void setReadFn(Func0 readFn)
public Func1 getWriteFn()
public void setWriteFn(Func1 writeFn)
public Object read()
Error - - ошибка чтения свойстваpublic void write(Object val)
val - значениеpublic Closeable addPropertyChangeListener(PropertyChangeListener listener)
public boolean isReadOnly()
public void setReadOnly(Boolean readOnly)
readOnly - true - только для записиpublic Boolean getReadOnlyDescent()
public void setReadOnlyDescent(Boolean readOnlyDescent)
readOnlyDescent - true - дочрение так же readOnly; null - как естьpublic boolean isNotNull()
public void setNotNull(boolean notNull)
public Class<?> getPropertyType()
public void setPropertyType(Class<?> pt)
public Enumeration<String> attributeNames()
public Method getReadMethod()
public void setReadMethod(Method readMethod) throws IntrospectionException
IntrospectionExceptionpublic Method getWriteMethod()
public void setWriteMethod(Method writeMethod) throws IntrospectionException
IntrospectionExceptionpublic boolean isBound()
public void setBound(boolean bound)
public boolean isConstrained()
public void setConstrained(boolean constrained)
public void setPropertyEditorClass(Class<?> propertyEditorClass)
public Class<?> getPropertyEditorClass()
public PropertyEditor createPropertyEditor(Object bean)
public String getName()
public void setName(String name)
public String getDisplayName()
public void setDisplayName(String displayName)
public boolean isExpert()
public void setExpert(boolean expert)
public boolean isHidden()
public void setHidden(boolean hidden)
public boolean isPreferred()
public void setPreferred(boolean preferred)
public String getShortDescription()
public void setShortDescription(String text)
public String getHtmlDescription()
public void setHtmlDescription(String htmlDescription)
public static Property.PropertyQuery propertyQuery()
public static Set<Property> propertiesOf(Class cls, Object bean, boolean include, String... names)
public static Set<Property> propertiesOf(Class cls, Object bean, Predicate<PropertyDescriptor> filter)
Copyright © 2018. All rights reserved.