graveyard/tools/org/apache/axis/tools/common/Signature.java
/**
	 * Split up a tokenised method signature into a list of attributes, a list of 
	 * name and return type tokens, a list of parameter tokens and a list of 
	 * initialiser tokens. 
	 */
Split up a tokenised method signature into a list of attributes, a list of
name and return type tokens, a list of parameter tokens and a list of
initialiser tokens.
Split up a tokenised method signature into a list of attributes a list of name and return type tokens a list of parameter tokens and a list of initialiser tokens .
private static boolean splitUp(
		List tokens,
		List attrs,
		List nameAndRet,
		List parms,
		List trailAttrs,
		List inits) {
		int nameStart;
		for (nameStart = 0; nameStart < tokens.size(); nameStart++) {
			String tok = (String) (tokens.get(nameStart));
			if (!knownAttrs.contains(tok) && !Configuration.isAttribute(tok))
				break;
            }
		if (nameStart == tokens.size())
			return false;
		int initStart = tokens.size();
		for (int i = nameStart; i < tokens.size(); i++) {
			String tok = (String) tokens.get(i);
			if ((tok.startsWith(":") && !tok.startsWith("::"))
				|| "throw".equals(tok))
				initStart = i;
		}
		int parmEnd;
		for (parmEnd = initStart - 1; parmEnd > nameStart; parmEnd--)
			if (")".equals(tokens.get(parmEnd)))
				break;
		if (parmEnd == nameStart)
			return false;
		int parmStart = parmEnd;
		for (parmStart = parmEnd; parmStart > nameStart; parmStart--)
			if ("(".equals(tokens.get(parmStart)))
				break;
		for (int i = 0; i < tokens.size(); i++) {
			Object tok = tokens.get(i);
			if (i < nameStart || Configuration.isAttribute((String) tok))
				attrs.add(tok);
			else if (i < parmStart)
				nameAndRet.add(tok);
			else if (i <= parmEnd)
				parms.add(tok);
			else if (i < initStart)
				trailAttrs.add(tok);
			else
				inits.add(tok);
		}
		return true;
	}
private static boolean splitUp ( List tokens , List attrs , List nameAndRet , List parms , List trailAttrs , List inits ) { int nameStart ; for ( nameStart = 0 ; nameStart < tokens . size ( ) ; nameStart ++ ) { String tok = ( String ) ( tokens . get ( nameStart ) ) ; if ( ! knownAttrs . contains ( tok ) && ! Configuration . isAttribute ( tok ) ) break ; } if ( nameStart == tokens . size ( ) ) return false ; int initStart = tokens . size ( ) ; for ( int i = nameStart ; i < tokens . size ( ) ; i ++ ) { String tok = ( String ) tokens . get ( i ) ; if ( ( tok . startsWith ( ":" ) && ! tok . startsWith ( "::" ) ) || "throw" . equals ( tok ) ) initStart = i ; } int parmEnd ; for ( parmEnd = initStart - 1 ; parmEnd > nameStart ; parmEnd -- ) if ( ")" . equals ( tokens . get ( parmEnd ) ) ) break ; if ( parmEnd == nameStart ) return false ; int parmStart = parmEnd ; for ( parmStart = parmEnd ; parmStart > nameStart ; parmStart -- ) if ( "(" . equals ( tokens . get ( parmStart ) ) ) break ; for ( int i = 0 ; i < tokens . size ( ) ; i ++ ) { Object tok = tokens . get ( i ) ; if ( i < nameStart || Configuration . isAttribute ( ( String ) tok ) ) attrs . add ( tok ) ; else if ( i < parmStart ) nameAndRet . add ( tok ) ; else if ( i <= parmEnd ) parms . add ( tok ) ; else if ( i < initStart ) trailAttrs . add ( tok ) ; else inits . add ( tok ) ; } return true ; }
Split up a tokenised method signature into a list of attributes, a list of
 name and return type tokens, a list of parameter tokens and a list of
 initialiser tokens.
Split up a tokenised method signature into a list of attributes a list of name and return type tokens a list of parameter tokens and a list of initialiser tokens .
// nameStart points to the start of the return type if there is one // else the start of the method name // initStart points to the initialisers, or thrown exceptions after  // the parameter list. throw is a keyword so we can safely search for it.