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>

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:

  • Method Details

    • 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 bean

      Parameters:

      beanType - the bean type to get a property set for, not null

      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 for

      Parameters:

      beanType - the bean type to get a property set for, not null

      checkNestedDefinitions - whether to scan for nested definitions in beanType

      filterDefinition - filtering conditions for nested properties

      Returns:

      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 interface PropertySet<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 interface PropertySet<T>

      Parameters:

      name - the property name to look for, not null

      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

    • toString

      public String toString()

      Overrides:

      toString in class Object