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
Constructors Constructor Description DefaultGetterPropertySelectionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getGetterMethodNameCandidates(String propertyName)Gives a set of possible method names based on a property name.Optional<String>getProperty(ConstrainableExecutable executable)Returns the property corresponding to the getter if the method is considered a getter.
-
-
-
Method Detail
-
getProperty
public Optional<String> getProperty(ConstrainableExecutable executable)
Description copied from interface:GetterPropertySelectionStrategyReturns the property corresponding to the getter if the method is considered a getter.- Specified by:
getPropertyin 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
public List<String> getGetterMethodNameCandidates(String propertyName)
Description copied from interface:GetterPropertySelectionStrategyGives 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:
getGetterMethodNameCandidatesin interfaceGetterPropertySelectionStrategy- Parameters:
propertyName- a property name- Returns:
- the
Setof possible getter names
-
-