You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That seems correct, the class java.util.Predicate is opaque to JavaScript (it is not marked @JsType nor has any @JsMethod)
I assume the the class DataTable is either marked @JsType or its method Select(Predicate) is declared as @JsMethod and that is why the warning is emitted. The method is declared to be callable directly from user written JavaScript code but takes a parameter that is opaque.
Difficult to tell with certainty since it is an incomplete snippet.
thanks!
This is my code: @jstype(isNative = true,namespace = JsPackage.GLOBAL)
public class DataTable {
@JsMethod
public native RowResult[] Select(Predicate<RowResult> predicate);
}。
I am trying to rewrite the DataTable class in js as an overridden java class. So the above problem occurred when I was packing. (When I typed the complete java code, I found that the size of the package was too large, almost 90M, so I rewrote some java classes in js to reduce the size of the package). If the current issue does not work out well, is there any way to reduce the package size (currently my configured compilationLevel: SIMPLE_OPTIMIZATIONS).
thanks~
Type of parameter 'predicate' in 'RowResult[] DataTable.Select(Predicate predicate)' is not usable by but exposed to JavaScript.
public RowResult[] Select(Predicate predicate){
return rows.stream().filter(predicate).toArray(RowResult[]::new);
}
The text was updated successfully, but these errors were encountered: