S
- the type used when setting the property valueG
- the type used when getting the property value, this is typically
either S
or Optional<S>
public interface PropertyDescriptor<S,G> extends Serializable
Use the factory methods in PropertyDescriptors
to create property
descriptor instances.
Modifier and Type | Method and Description |
---|---|
G |
get(Element element)
Gets the property value for the given element.
|
default G |
get(HasElement hasElement)
Gets the property value for the given component.
|
String |
getPropertyName()
Gets the name of the property.
|
void |
set(Element element,
S value)
Sets the property value for the given element.
|
default void |
set(HasElement hasElement,
S value)
Sets the property value for the given component.
|
default void set(HasElement hasElement, S value)
hasElement
- the component for which to set the value, not
null
value
- the property value to setvoid set(Element element, S value)
element
- the element for which to set the value, not null
value
- the property value to setdefault G get(HasElement hasElement)
hasElement
- the component for which to get the value, not
null
G get(Element element)
element
- the element for which to get the value, not null
String getPropertyName()
Copyright © 2019. All rights reserved.