org.apache.mina.integration.ognl
Class PropertyTypeConverter
java.lang.Object
org.apache.mina.integration.ognl.PropertyTypeConverter
- All Implemented Interfaces:
- ognl.TypeConverter
public class PropertyTypeConverter
- extends 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.
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyTypeConverter
public PropertyTypeConverter()
convertValue
public Object convertValue(Map ctx,
Object target,
Member member,
String attrName,
Object value,
Class toType)
- Specified by:
convertValue
in interface ognl.TypeConverter
getPropertyEditor
protected PropertyEditor getPropertyEditor(Class<?> type,
String attrName,
Class<?> attrType)
Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.