// get a list of whitespace separated classnames from a property.
    private String[] parseClassNames(String propertyName) {
	String hands = getProperty(propertyName);
	if (hands == null) {
	    return new String[0];
	}
	hands = hands.trim();
	int ix = 0;
	Vector result = new Vector();
	while (ix < hands.length()) {
	    int end = ix;
	    while (end < hands.length()) {
		if (Character.isWhitespace(hands.charAt(end))) {
		    break;
		}
		if (hands.charAt(end) == ',') {
		    break;
		}
		end++;
	    }
	    String word = hands.substring(ix, end);
	    ix = end+1;
	    word = word.trim();
	    if (word.length() == 0) {
		continue;
	    }
	    result.add(word);
	}
	return (String[]) result.toArray(new String[result.size()]);
    }
Exemple #2
0
 /** Skip any whitespace. @return @throws Exception */
 int skipWs() throws Exception {
   while (Character.isWhitespace(current())) read();
   return current();
 }