public abstract class PropertyMatches extends Object
Mainly for use within the framework and in particular the binding facility.
forProperty(String, Class), 
forField(String, Class)| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_MAX_DISTANCEDefault maximum property distance: 2. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | appendHintMessage(StringBuilder msg) | 
| abstract String | buildErrorMessage()Build an error message for the given invalid property name,
 indicating the possible property matches. | 
| static PropertyMatches | forField(String propertyName,
        Class<?> beanClass)Create PropertyMatches for the given field property. | 
| static PropertyMatches | forField(String propertyName,
        Class<?> beanClass,
        int maxDistance)Create PropertyMatches for the given field property. | 
| static PropertyMatches | forProperty(String propertyName,
           Class<?> beanClass)Create PropertyMatches for the given bean property. | 
| static PropertyMatches | forProperty(String propertyName,
           Class<?> beanClass,
           int maxDistance)Create PropertyMatches for the given bean property. | 
| String[] | getPossibleMatches()Return the calculated possible matches. | 
| String | getPropertyName()Return the name of the requested property. | 
public static final int DEFAULT_MAX_DISTANCE
public static PropertyMatches forProperty(String propertyName, Class<?> beanClass)
propertyName - the name of the property to find possible matches forbeanClass - the bean class to search for matchespublic static PropertyMatches forProperty(String propertyName, Class<?> beanClass, int maxDistance)
propertyName - the name of the property to find possible matches forbeanClass - the bean class to search for matchesmaxDistance - the maximum property distance allowed for matchespublic static PropertyMatches forField(String propertyName, Class<?> beanClass)
propertyName - the name of the field to find possible matches forbeanClass - the bean class to search for matchespublic static PropertyMatches forField(String propertyName, Class<?> beanClass, int maxDistance)
propertyName - the name of the field to find possible matches forbeanClass - the bean class to search for matchesmaxDistance - the maximum property distance allowed for matchespublic String getPropertyName()
public String[] getPossibleMatches()
public abstract String buildErrorMessage()
protected void appendHintMessage(StringBuilder msg)