graveyard/tools/org/apache/axis/tools/common/Signature.java
/**
	 * Parse the signature into tokens. This removes whitespace and comments
	 * and separates out "*", ",", "(", ")", "&", "[" and "]".
	 */
Parse the signature into tokens.
Parse the signature into tokens .
private static List tokenise(String s) {
		ArrayList tokens = new ArrayList();
		String tok = null;
		boolean space = true;
		for (int i = 0; i < s.length(); i++) {
			char c = s.charAt(i);
			if (Character.isWhitespace(c)) {
				space = true;
				continue;
			}
			if (space) {
				if (tok != null)
					tokens.add(tok);
				tok = "" + c;
			} else
				tok += c;
			space = false;
			if (tok.endsWith("/*")) {
				String sub = s.substring(i);
				int endcomm = sub.indexOf("*/");
				if (endcomm == -1)
					break;
				i += endcomm + 1;
				if (tok.equals("/*"))
					tok = "";
				else
					tok = tok.substring(0, tok.length() - 2);
				continue;
			}
			if (tok.endsWith("//")) {
				String sub = s.substring(i);
				int endcomm = sub.indexOf("\n");
				if (endcomm == -1)
					break;
				i += endcomm;
				if (tok.equals("//"))
					tok = "";
				else
					tok = tok.substring(0, tok.length() - 1);
				continue;
			}
			if (tok.endsWith("::"))
				space = true;
			String sc = "" + c;
			if (specialOperators.contains(sc)) {
				if (!tok.equals(sc)) {
					tokens.add(tok.substring(0, tok.length() - 1));
					tok = sc;
				}
				space = true;
			}
		}
		tokens.add(tok);
		return tokens;
	}
private static List tokenise ( String s ) { ArrayList tokens = new ArrayList ( ) ; String tok = null ; boolean space = true ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; if ( Character . isWhitespace ( c ) ) { space = true ; continue ; } if ( space ) { if ( tok != null ) tokens . add ( tok ) ; tok = "" + c ; } else tok += c ; space = false ; if ( tok . endsWith ( "/*" ) ) { String sub = s . substring ( i ) ; int endcomm = sub . indexOf ( "*/" ) ; if ( endcomm == - 1 ) break ; i += endcomm + 1 ; if ( tok . equals ( "/*" ) ) tok = "" ; else tok = tok . substring ( 0 , tok . length ( ) - 2 ) ; continue ; } if ( tok . endsWith ( "//" ) ) { String sub = s . substring ( i ) ; int endcomm = sub . indexOf ( "\n" ) ; if ( endcomm == - 1 ) break ; i += endcomm ; if ( tok . equals ( "//" ) ) tok = "" ; else tok = tok . substring ( 0 , tok . length ( ) - 1 ) ; continue ; } if ( tok . endsWith ( "::" ) ) space = true ; String sc = "" + c ; if ( specialOperators . contains ( sc ) ) { if ( ! tok . equals ( sc ) ) { tokens . add ( tok . substring ( 0 , tok . length ( ) - 1 ) ) ; tok = sc ; } space = true ; } } tokens . add ( tok ) ; return tokens ; }
Parse the signature into tokens.
Parse the signature into tokens .