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 beanAll Implemented Interfaces:
public class BeanPropertySet<T> extends Object implements PropertySet<T>
A
PropertySet
that 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:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
BeanPropertySet.NestedBeanPropertyDefinition<T,V>
Contains properties for a bean type which is nested in another definition.
-
Method Summary
All Methods Modifier and Type Method and Description static <T> PropertySet<T>
get(Class<? extends T> beanType)
Gets a
BeanPropertySet
for the given bean type.static <T> PropertySet<T>
get(Class<? extends T> beanType, boolean checkNestedDefinitions, PropertyFilterDefinition filterDefinition)
Gets a
BeanPropertySet
for 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.
String
toString()
-
-
-
Method Detail
-
get
public static <T> PropertySet<T> get(Class<? extends T> beanType)
Gets a
BeanPropertySet
for the given bean type.Type Parameters:
T
- the type of the beanParameters:
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 a
BeanPropertySet
for the given bean type.Type Parameters:
T
- the bean type to get a property set forParameters:
beanType
- the bean type to get a property set for, notnull
checkNestedDefinitions
- whether to scan for nested definitions in beanTypefilterDefinition
- filtering conditions for nested propertiesReturns:
the bean property set, not
null
-
getProperties
public Stream<PropertyDefinition<T,?>> getProperties()
Description copied from interface:
PropertySet
Gets all known properties as a stream.
Specified by:
getProperties
in interfacePropertySet<T>
Returns:
a stream of property names, not
null
-
getProperty
public Optional<PropertyDefinition<T,?>> getProperty(String name) throws IllegalArgumentException
Description copied from interface:
PropertySet
Gets the definition for the named property, or an empty optional if there is no property with the given name.
Specified by:
getProperty
in interfacePropertySet<T>
Parameters:
name
- the property name to look for, notnull
Returns:
the property definition, or empty optional if property doesn't exist
Throws:
-
getBeanType
public Class<T> getBeanType()
Gets the bean type of this bean property set.
Returns:
the bean type of this bean property set
-
-