Class DefaultGetterPropertySelectionStrategy
java.lang.Object
org.hibernate.validator.internal.properties.DefaultGetterPropertySelectionStrategy
- All Implemented Interfaces:
GetterPropertySelectionStrategy
public class DefaultGetterPropertySelectionStrategy
extends Object
implements GetterPropertySelectionStrategy
- Author:
- Marko Bekhta
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetGetterMethodNameCandidates
(String propertyName) Gives a set of possible method names based on a property name.getProperty
(ConstrainableExecutable executable) Returns the property corresponding to the getter if the method is considered a getter.
-
Constructor Details
-
DefaultGetterPropertySelectionStrategy
public DefaultGetterPropertySelectionStrategy()
-
-
Method Details
-
getProperty
Description copied from interface:GetterPropertySelectionStrategy
Returns the property corresponding to the getter if the method is considered a getter.- Specified by:
getProperty
in interfaceGetterPropertySelectionStrategy
- Parameters:
executable
- aConstrainableExecutable
- Returns:
- an optional containing the property corresponding to the given executable if it is considered a getter, or an empty optional otherwise
-
getGetterMethodNameCandidates
Description copied from interface:GetterPropertySelectionStrategy
Gives a set of possible method names based on a property name. Usually, it means a property name prefixed with something like "get", "is", "has" etc.- Specified by:
getGetterMethodNameCandidates
in interfaceGetterPropertySelectionStrategy
- Parameters:
propertyName
- a property name- Returns:
- the
Set
of possible getter names
-