Skip to content

Commit

Permalink
Remove underline method name
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jan 24, 2024
1 parent d6486b5 commit 8b937ce
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ public static void generateMethod(IDLDefaultCodeParser idlParser, JParser jParse
}
}

String updatedMethodName = idlParser.getIDLMethodName(methodName);
// Remove methods characters if it contains "_1", "_2", etc.
String fixedMethodName = methodName.replaceFirst("_\\d$", "");

String updatedMethodName = idlParser.getIDLMethodName(fixedMethodName);
ArrayList<IDLParameter> parameters = idlMethod.parameters;
MethodDeclaration methodDeclaration = classOrInterfaceDeclaration.addMethod(updatedMethodName, Modifier.Keyword.PUBLIC);
methodDeclaration.setStatic(idlMethod.isStaticMethod);
Expand Down

0 comments on commit 8b937ce

Please sign in to comment.