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 -
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: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
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
-