public abstract class PropertyMatches
extends java.lang.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_DISTANCE
Default maximum property distance: 2.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendHintMessage(java.lang.StringBuilder msg) |
abstract java.lang.String |
buildErrorMessage()
Build an error message for the given invalid property name,
indicating the possible property matches.
|
static PropertyMatches |
forField(java.lang.String propertyName,
java.lang.Class<?> beanClass)
Create PropertyMatches for the given field property.
|
static PropertyMatches |
forField(java.lang.String propertyName,
java.lang.Class<?> beanClass,
int maxDistance)
Create PropertyMatches for the given field property.
|
static PropertyMatches |
forProperty(java.lang.String propertyName,
java.lang.Class<?> beanClass)
Create PropertyMatches for the given bean property.
|
static PropertyMatches |
forProperty(java.lang.String propertyName,
java.lang.Class<?> beanClass,
int maxDistance)
Create PropertyMatches for the given bean property.
|
java.lang.String[] |
getPossibleMatches()
Return the calculated possible matches.
|
java.lang.String |
getPropertyName()
Return the name of the requested property.
|
public static final int DEFAULT_MAX_DISTANCE
public static PropertyMatches forProperty(java.lang.String propertyName, java.lang.Class<?> beanClass)
propertyName
- the name of the property to find possible matches forbeanClass
- the bean class to search for matchespublic static PropertyMatches forProperty(java.lang.String propertyName, java.lang.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(java.lang.String propertyName, java.lang.Class<?> beanClass)
propertyName
- the name of the field to find possible matches forbeanClass
- the bean class to search for matchespublic static PropertyMatches forField(java.lang.String propertyName, java.lang.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 java.lang.String getPropertyName()
public java.lang.String[] getPossibleMatches()
public abstract java.lang.String buildErrorMessage()
protected void appendHintMessage(java.lang.StringBuilder msg)