org.springframework.yarn.support
Class ParsingUtils

java.lang.Object
  extended by org.springframework.yarn.support.ParsingUtils

public class ParsingUtils
extends Object

Various static string and parsing utilities.

Author:
Janne Valkealahti

Constructor Summary
ParsingUtils()
           
 
Method Summary
static String extractClasspath(String source, String delimiter)
          Extracts a classpath string from a source text.
static String extractRunnableCommand(String source)
          Extracts a string from another string which can be used as a command in shell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsingUtils

public ParsingUtils()
Method Detail

extractRunnableCommand

public static String extractRunnableCommand(String source)
Extracts a string from another string which can be used as a command in shell. Resulting string can't have any unnecessary spaces, line delimiters or any other characters which might prevent command to be run.

Parameters:
source - Source string
Returns:
Command string or null if error occurred

extractClasspath

public static String extractClasspath(String source,
                                      String delimiter)
Extracts a classpath string from a source text.

Parameters:
source - the source string
delimiter - the delimiter
Returns:
classpath string