Add simple noreflect wrapper fn generator
This commit is contained in:
parent
00d08e11f4
commit
51112a09ed
|
@ -74,10 +74,14 @@ import org.teavm.jso.JSFunctor;
|
||||||
//Made by ZXMushroom63
|
//Made by ZXMushroom63
|
||||||
|
|
||||||
public class PLReflect extends ModData {
|
public class PLReflect extends ModData {
|
||||||
|
@JSBody(params = { "reflectInst" }, script = "reflectInst.getMethodMapFromClass = function(classObj) {var outMethodMap = {}; classObj.methods.forEach(method=>{outMethodMap[method.methodName]=method;}); return outMethodMap;}")
|
||||||
|
public static native BaseData setMethodMapFn(BaseData reflectInst);
|
||||||
|
|
||||||
%classdefs%
|
%classdefs%
|
||||||
|
|
||||||
public static PLReflect makeModData() {
|
public static PLReflect makeModData() {
|
||||||
PLReflect plReflectGlobal = new PLReflect();
|
PLReflect plReflectGlobal = new PLReflect();
|
||||||
|
setMethodMapFn(plReflectGlobal);
|
||||||
ArrayList<BaseData> reflectProfiles = new ArrayList<BaseData>();
|
ArrayList<BaseData> reflectProfiles = new ArrayList<BaseData>();
|
||||||
|
|
||||||
%classdefcalls%
|
%classdefcalls%
|
||||||
|
|
Loading…
Reference in New Issue