Package com.vaadin.flow.data.binder
Class BeanPropertySet<T>
- java.lang.Object
-
- com.vaadin.flow.data.binder.BeanPropertySet<T>
-
- Type Parameters:
T- the type of the bean
- All Implemented Interfaces:
PropertySet<T>,Serializable
public class BeanPropertySet<T> extends Object implements PropertySet<T>
APropertySetthat uses reflection to find bean properties.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBeanPropertySet.NestedBeanPropertyDefinition<T,V>Contains properties for a bean type which is nested in another definition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> PropertySet<T>get(Class<? extends T> beanType)Gets aBeanPropertySetfor the given bean type.static <T> PropertySet<T>get(Class<? extends T> beanType, boolean checkNestedDefinitions, PropertyFilterDefinition filterDefinition)Gets aBeanPropertySetfor the given bean type.Class<T>getBeanType()Gets the bean type of this bean property set.Stream<PropertyDefinition<T,?>>getProperties()Gets all known properties as a stream.Optional<PropertyDefinition<T,?>>getProperty(String name)Gets the definition for the named property, or an empty optional if there is no property with the given name.StringtoString()
-
-
-
Method Detail
-
get
public static <T> PropertySet<T> get(Class<? extends T> beanType)
Gets aBeanPropertySetfor the given bean type.- Type Parameters:
T- the type of the bean- Parameters:
beanType- the bean type to get a property set for, notnull- Returns:
- the bean property set, not
null
-
get
public static <T> PropertySet<T> get(Class<? extends T> beanType, boolean checkNestedDefinitions, PropertyFilterDefinition filterDefinition)
Gets aBeanPropertySetfor the given bean type.- Type Parameters:
T- the bean type to get a property set for- Parameters:
beanType- the bean type to get a property set for, notnullcheckNestedDefinitions- whether to scan for nested definitions in beanTypefilterDefinition- filtering conditions for nested properties- Returns:
- the bean property set, not
null
-
getProperties
public Stream<PropertyDefinition<T,?>> getProperties()
Description copied from interface:PropertySetGets all known properties as a stream.- Specified by:
getPropertiesin interfacePropertySet<T>- Returns:
- a stream of property names, not
null
-
getProperty
public Optional<PropertyDefinition<T,?>> getProperty(String name) throws IllegalArgumentException
Description copied from interface:PropertySetGets the definition for the named property, or an empty optional if there is no property with the given name.- Specified by:
getPropertyin interfacePropertySet<T>- Parameters:
name- the property name to look for, notnull- Returns:
- the property definition, or empty optional if property doesn't exist
- Throws:
IllegalArgumentException
-
getBeanType
public Class<T> getBeanType()
Gets the bean type of this bean property set.- Returns:
- the bean type of this bean property set
-
-