Class ElementParser


  • public final class ElementParser
    extends java.lang.Object
    Originally taken from JBOSS project (thanks guys, great work) Original class: org.jboss.osgi.metadata.spi.ElementParser -> JBossOSGi Resolver Metadata
    Author:
    Thomas.Diesler@jboss.com
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value, char delimiter)  
      static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value, char delimiter, boolean trim)
      Parses delimited string and returns an array containing the tokens.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parseDelimitedString

        public static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value,
                                                                            char delimiter)
      • parseDelimitedString

        public static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value,
                                                                            char delimiter,
                                                                            boolean trim)
        Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of delimiter characters.
        Parameters:
        value - the delimited string to parse.
        delimiter - the characters delimiting the tokens.
        trim - whether to trim the parts.
        Returns:
        an array of string tokens or null if there were no tokens.