public <T> T convert(Object source, Class<T> targetType) {
if (TYPE_TO_STRING_MAP == type)
{
if (source instanceof FlowHandlerMapping)
{
FlowHandlerMapping mapping = (FlowHandlerMapping) source;
HashMap<String, Object> result = new HashMap<String, Object>();
FlowDefinitionRegistry registry = mapping.getFlowRegistry();
for (String flowId: registry.getFlowDefinitionIds())
{
result.put(flowId, registry.getFlowDefinition(flowId));
}
return (T)result;