@Test public void testExtractFunctionName() throws Exception { assertEquals("bob", parser.extractFunctionName("void bob(int a)")); assertEquals("bob", parser.extractFunctionName("void bob (int a)")); }
String extractFunctionName(String signatureText) throws ParseException { int parenIndex = signatureText.indexOf('('); if (parenIndex < 0) { throw new ParseException("Can't find function name"); } String[] split = StringUtils.split(signatureText.substring(0, parenIndex)); if (split.length < 2) { throw new ParseException("Can't find function name"); } String name = split[split.length - 1]; return resolveName(name); }
FunctionSignatureParser { String extractFunctionName(String signatureText) throws ParseException { int parenIndex = signatureText.indexOf('('); if (parenIndex < 0) { throw new ParseException("Can't find function name"); } String[] split = StringUtils.split(signatureText.substring(0, parenIndex)); if (split.length < 2) { throw new ParseException("Can't find function name"); } String name = split[split.length - 1]; return resolveName(name); } }
FunctionSignatureParser { String extractFunctionName(String signatureText) throws ParseException { int parenIndex = signatureText.indexOf('('); if (parenIndex < 0) { throw new ParseException("Can't find function name"); } String[] split = StringUtils.split(signatureText.substring(0, parenIndex)); if (split.length < 2) { throw new ParseException("Can't find function name"); } String name = split[split.length - 1]; return resolveName(name); } FunctionSignatureParser(Program program, DataTypeManagerService service); }
FunctionSignatureParser { String extractFunctionName(String signatureText) throws ParseException { int parenIndex = signatureText.indexOf('('); if (parenIndex < 0) { throw new ParseException("Can't find function name"); } String[] split = StringUtils.split(signatureText.substring(0, parenIndex)); if (split.length < 2) { throw new ParseException("Can't find function name"); } String name = split[split.length - 1]; return resolveName(name); } FunctionSignatureParser(Program program, DataTypeManagerService service); FunctionDefinitionDataType parse(FunctionSignature originalSignature,
			String signatureText); }
FunctionSignatureParser { String extractFunctionName(String signatureText) throws ParseException { int parenIndex = signatureText.indexOf('('); if (parenIndex < 0) { throw new ParseException("Can't find function name"); } String[] split = StringUtils.split(signatureText.substring(0, parenIndex)); if (split.length < 2) { throw new ParseException("Can't find function name"); } String name = split[split.length - 1]; return resolveName(name); } FunctionSignatureParser(Program program, DataTypeManagerService service); FunctionDefinitionDataType parse(FunctionSignature originalSignature,
			String signatureText);  }