Interface PropertyDefinition<T,V>

Type Parameters:
T - the type of the property set
V - the property type
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractBeanPropertyDefinition, BeanPropertySet.NestedBeanPropertyDefinition

public interface PropertyDefinition<T,V> extends Serializable
A property from a PropertySet.
Since:
1.0
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the human readable caption to show for this property.
    com.vaadin.flow.function.ValueProvider<T,V>
    Gets the value provider that is used for finding the value of this property for a bean.
    Gets the full name of this property.
    Gets the parent property of this property if this is a sub-property of the property set.
    Gets the type of the class containing this property.
    Gets the PropertySet that this property belongs to.
    Gets an optional setter for storing a property value in a bean.
    default String
    Gets the top level name of this property.
    Gets the type of this property.
    boolean
    Gets whether the type of this property references a generic type (thus getType() will return Object) or a concrete type.
    default boolean
    Gets whether this property belongs to some other property in the property set, or directly to the property set.
  • Method Details

    • getGetter

      com.vaadin.flow.function.ValueProvider<T,V> getGetter()
      Gets the value provider that is used for finding the value of this property for a bean.
      Returns:
      the getter, not null
    • getSetter

      Optional<Setter<T,V>> getSetter()
      Gets an optional setter for storing a property value in a bean.
      Returns:
      the setter, or an empty optional if this property is read-only
    • getType

      Class<V> getType()
      Gets the type of this property.
      Returns:
      the property type. not null
    • isGenericType

      boolean isGenericType()
      Gets whether the type of this property references a generic type (thus getType() will return Object) or a concrete type.
      Returns:
      true if the type of this property references a generic type, false otherwise
    • getPropertyHolderType

      Class<?> getPropertyHolderType()
      Gets the type of the class containing this property.
      Returns:
      the property type. not null
    • getName

      String getName()
      Gets the full name of this property.
      Returns:
      the property name, not null
    • getTopLevelName

      default String getTopLevelName()
      Gets the top level name of this property.
      Returns:
      the top level property name, not null
    • getCaption

      String getCaption()
      Gets the human readable caption to show for this property.
      Returns:
      the caption to show, not null
    • getPropertySet

      PropertySet<T> getPropertySet()
      Gets the PropertySet that this property belongs to.
      Returns:
      the property set, not null
    • getParent

      PropertyDefinition<T,?> getParent()
      Gets the parent property of this property if this is a sub-property of the property set. If this property belongs directly to the property set, it doesn't have a parent and this method returns null.
      Returns:
      the parent property, may be null
    • isSubProperty

      default boolean isSubProperty()
      Gets whether this property belongs to some other property in the property set, or directly to the property set.
      Returns:
      true if this property is a sub-property of the property set it belongs to, false otherwise