public class PropertyTypeConverter
extends java.lang.Object
implements ognl.TypeConverter
PropertyEditor-based implementation of OGNL TypeConverter.
This converter uses the PropertyEditor implementations in
mina-integration-beans module to perform conversion. To use this
converter:
OgnlContext ctx = Ognl.createDefaultContext(root);
ctx.put(OgnlContext.TYPE_CONVERTER_CONTEXT_KEY, new PropertyTypeConverter());
You can also override getPropertyEditor(Class, String, Class)
method to have more control over how an appropriate PropertyEditor
is chosen.| Constructor and Description |
|---|
PropertyTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertValue(java.util.Map ctx,
java.lang.Object target,
java.lang.reflect.Member member,
java.lang.String attrName,
java.lang.Object value,
java.lang.Class toType) |
protected java.beans.PropertyEditor |
getPropertyEditor(java.lang.Class<?> type,
java.lang.String attrName,
java.lang.Class<?> attrType) |
public java.lang.Object convertValue(java.util.Map ctx,
java.lang.Object target,
java.lang.reflect.Member member,
java.lang.String attrName,
java.lang.Object value,
java.lang.Class toType)
convertValue in interface ognl.TypeConverterprotected java.beans.PropertyEditor getPropertyEditor(java.lang.Class<?> type,
java.lang.String attrName,
java.lang.Class<?> attrType)