Skip to content

Commit

Permalink
java format
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi committed Dec 12, 2024
1 parent 9f9a1b5 commit eb863b0
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private static void appendType(StringBuilder descriptor, Class<?> type) {
}

public void addImplementation(
String binaryName, long port, long functionPointer, List<String> asyncMethods) {
String binaryName, long port, long functionPointer, List<String> asyncMethods) {
implementations.put(binaryName, new DartImplementation(port, functionPointer));
this.asyncMethods.addAll(asyncMethods);
}
Expand All @@ -103,8 +103,8 @@ public Object build() throws ClassNotFoundException {
classes.add(Class.forName(binaryName));
}
Object obj =
Proxy.newProxyInstance(
classes.get(0).getClassLoader(), classes.toArray(new Class<?>[0]), this);
Proxy.newProxyInstance(
classes.get(0).getClassLoader(), classes.toArray(new Class<?>[0]), this);
for (DartImplementation implementation : implementations.values()) {
cleaner.register(obj, implementation.port);
}
Expand All @@ -115,13 +115,13 @@ public Object build() throws ClassNotFoundException {
/// [0]: The address of the result pointer used for the clean-up.
/// [1]: The result of the invocation.
private static native Object[] _invoke(
long port,
long isolateId,
long functionPtr,
Object proxy,
String methodDescriptor,
Object[] args,
boolean isBlocking);
long port,
long isolateId,
long functionPtr,
Object proxy,
String methodDescriptor,
Object[] args,
boolean isBlocking);

private static native void _cleanUp(long resultPtr);

Expand All @@ -140,14 +140,14 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
String descriptor = getDescriptor(method);
boolean isBlocking = !asyncMethods.contains(descriptor);
Object[] result =
_invoke(
implementation.port,
isolateId,
implementation.pointer,
proxy,
descriptor,
args,
isBlocking);
_invoke(
implementation.port,
isolateId,
implementation.pointer,
proxy,
descriptor,
args,
isBlocking);
if (!isBlocking) {
return null;
}
Expand Down

0 comments on commit eb863b0

Please sign in to comment.