Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.runtime.linker;
 
 import static me.qmx.jitescript.util.CodegenUtils.*;
 
 
public class DynJSBootstrapper {
    public static Handle HANDLE;
    public static Object[] ARGS = new Object[0];
    private static RephractLinker linker;
    static {
        try {
            JSJavaImplementationManager implementationManager = new JSJavaImplementationManager();
            CoercionMatrix coercionMatrix = new DynJSCoercionMatrix(implementationManager);
            ResolverManager manager = new ResolverManager(coercionMatrix);
            // LinkLogger logger = new FileLinkLogger("dynjs-linker.log");
            LinkLogger logger = new NullLinkLogger();
             = new RephractLinker(logger);
            .addLinkStrategy(new JavascriptObjectLinkStrategy(logger));
            .addLinkStrategy(new JavascriptPrimitiveLinkStrategy(logger));
            .addLinkStrategy(new JavaNullReplacingLinkStrategy(logger));
            .addLinkStrategy(new JSJavaImplementationLinkStrategy(implementationManagerlogger));
            .addLinkStrategy(new JSJavaClassLinkStrategy(loggermanager));
            .addLinkStrategy(new JSJavaArrayLinkStrategy(logger));
            .addLinkStrategy(new JSJavaInstanceLinkStrategy(loggermanager));
            .addLinkStrategy(new ShadowObjectLinkStrategy(logger));
             = new Handle(.,
                    p(DynJSBootstrapper.class), "bootstrap",
                    MethodType.methodType(CallSite.classLookup.classString.classMethodType.class)
                            .toMethodDescriptorString());
             = new InterpretingInvokeDynamicHandler();
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
    public static CallSite bootstrap(Lookup lookupString nameMethodType typethrows Throwable {
        return .bootstrap(lookupnametype);
    }
        return .getBootstrapMethodHandle();
    }
        return ;
    }
New to GrepCode? Check out our FAQ X