Package com.bc.ceres.binding
Class Property
- java.lang.Object
-
- com.bc.ceres.binding.Property
-
public class Property extends Object
A property is composed of aPropertyDescriptor
(static type description) and anPropertyAccessor
(dynamic value assignment). TheProperty
interface is a realisation of the Value Object design pattern. Most of the time, properties are used as part of aPropertyContainer
.- Since:
- 0.6
-
-
Constructor Summary
Constructors Constructor Description Property(PropertyDescriptor descriptor, PropertyAccessor accessor)
-
Method Summary
-
-
-
Constructor Detail
-
Property
public Property(PropertyDescriptor descriptor, PropertyAccessor accessor)
-
-
Method Detail
-
create
public static <T> Property create(String name, Class<? extends T> type, T defaultValue, boolean notNull)
-
createForMapEntry
public static Property createForMapEntry(Map<String,Object> map, String name, Class<?> type)
-
createForMapEntry
public static Property createForMapEntry(Map<String,Object> map, String name, Class<?> type, Object value)
-
getDescriptor
public PropertyDescriptor getDescriptor()
-
getContainer
public PropertyContainer getContainer()
-
setContainer
public void setContainer(PropertyContainer container)
-
getValidator
public Validator getValidator()
-
getValueAsText
public String getValueAsText()
-
setValueFromText
public void setValueFromText(String text) throws ValidationException
- Throws:
ValidationException
-
getName
public String getName()
-
getType
public Class<?> getType()
-
getValue
public <T> T getValue()
-
setValue
public void setValue(Object value) throws ValidationException
- Throws:
ValidationException
-
validate
public void validate(Object value) throws ValidationException
- Throws:
ValidationException
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
-
-