PySignature (@NotNull String path, @NotNull String string) { String[] parts = string.split("\t"); if (parts.length > 0) { PySignature signature = new PySignature(path, parts[0]); for (int i = 1; i < parts.length; i++) { String part = parts[i]; if (part.isEmpty()) { continue; } String[] var = part.split(":"); if (var.length == 2) { if (RETURN_TYPE.equals(var[0])) { signature = signature.addReturnType(var[1]); } else { signature = signature.addArgument(var[0], var[1]); } } else { throw new IllegalStateException( "Should be <name>:<type> format for arg or " + RETURN_TYPE + ":<type> for return type; '" + part + "' instead."); } } return signature; } return null; }