01: /*
02: * $Id: ListValueMap.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.config.spring.parsers.assembly.configuration;
12:
13: import java.util.LinkedList;
14: import java.util.List;
15: import java.util.StringTokenizer;
16:
17: /**
18: * Be careful - this doesn't work with endpoint properties because they need to be converted to a URI.
19: */
20: public class ListValueMap implements ValueMap {
21:
22: public Object rewrite(String value) {
23: List list = new LinkedList();
24: StringTokenizer tokenizer = new StringTokenizer(value);
25: while (tokenizer.hasMoreTokens()) {
26: list.add(tokenizer.nextToken());
27: }
28: return list;
29: }
30:
31: }
|