Package org.dynalang.dynalink.linker

Examples of org.dynalang.dynalink.linker.LinkerServices


        final MethodHandle mh = getTest1XvMethod();
        final MethodType callSiteType = MethodType.methodType(int.class, Object.class, Object.class, Object.class);

        final int[] converterInvoked = new int[1];

        LinkerServices ls = new MockLinkerServices() {
            @Override
            public boolean canConvert(Class<?> from, Class<?> to) {
                assertSame(Object.class, from);
                assertSame(int[].class, to);
                return true;
View Full Code Here


        final MethodHandle mh = getTest1SvMethod();
        final MethodType callSiteType = MethodType.methodType(String.class, Object.class, Object.class, Object.class);

        final int[] converterInvoked = new int[1];

        LinkerServices ls = new MockLinkerServices() {
            @Override
            public boolean canConvert(Class<?> from, Class<?> to) {
                assertSame(Object.class, from);
                assertSame(String[].class, to);
                return true;
View Full Code Here

    /**
     * Regression test for a bug with selecting PrintStream.println() overloads.
     */
    public void testPrintLn() throws Throwable {
        final BeansLinker linker = new BeansLinker();
        final LinkerServices linkerServices = LinkerServicesFactory.getLinkerServices(linker);
        final Object out = System.out;
        final CallSiteDescriptor desc = CallSiteDescriptorFactory.create(MethodHandles.publicLookup(),
                "dyn:callMethod:println", MethodType.methodType(Object.class, Object.class, Object.class));
        final LinkRequest req = new LinkRequestImpl(desc, false, out, "helloWorld");
        linker.getGuardedInvocation(req, linkerServices).getInvocation().invokeWithArguments(out, "helloWorld");
View Full Code Here

TOP

Related Classes of org.dynalang.dynalink.linker.LinkerServices

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.