Skip to content

Commit

Permalink
Make all native calls public and starts with native_
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Aug 15, 2024
1 parent 9a4e89b commit 3e66cdf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

public class IDLMethodParser {

static final String NATIVE_METHOD = "native_";

static final String GET_OBJECT_TEMPLATE =
"{\n" +
" long pointer = [METHOD];\n" +
Expand Down Expand Up @@ -346,8 +348,8 @@ public static MethodDeclaration generateNativeMethod(boolean isReturnValue, Stri

// Clone some generated idl method settings
MethodDeclaration nativeMethod = new MethodDeclaration();
nativeMethod.setName(methodName + "NATIVE");
nativeMethod.setModifiers(Modifier.createModifierList(Modifier.Keyword.PRIVATE, Modifier.Keyword.STATIC, Modifier.Keyword.NATIVE));
nativeMethod.setName(NATIVE_METHOD + methodName);
nativeMethod.setModifiers(Modifier.createModifierList(Modifier.Keyword.PUBLIC, Modifier.Keyword.STATIC, Modifier.Keyword.NATIVE));
nativeMethod.removeBody();

if(!isStatic) {
Expand Down

0 comments on commit 3e66cdf

Please sign in to comment.