当前位置: 首页>>代码示例>>Java>>正文


Java RemoteExample类代码示例

本文整理汇总了Java中test.java.lang.invoke.remote.RemoteExample的典型用法代码示例。如果您正苦于以下问题:Java RemoteExample类的具体用法?Java RemoteExample怎么用?Java RemoteExample使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RemoteExample类属于test.java.lang.invoke.remote包,在下文中一共展示了RemoteExample类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFindSpecial

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
void testFindSpecial(Class<?> specialCaller,
                     Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
    if (specialCaller == RemoteExample.class) {
        testFindSpecial(false, EXAMPLE,  specialCaller, defc, ret, name, params);
        testFindSpecial(false, PRIVATE,  specialCaller, defc, ret, name, params);
        testFindSpecial(false, PACKAGE,  specialCaller, defc, ret, name, params);
        testFindSpecial(true,  SUBCLASS, specialCaller, defc, ret, name, params);
        testFindSpecial(false, PUBLIC,   specialCaller, defc, ret, name, params);
        return;
    }
    testFindSpecial(true,  EXAMPLE,  specialCaller, defc, ret, name, params);
    testFindSpecial(true,  PRIVATE,  specialCaller, defc, ret, name, params);
    testFindSpecial(false, PACKAGE,  specialCaller, defc, ret, name, params);
    testFindSpecial(false, SUBCLASS, specialCaller, defc, ret, name, params);
    testFindSpecial(false, PUBLIC,   specialCaller, defc, ret, name, params);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:17,代码来源:MethodHandlesTest.java

示例2: testFindSpecial0

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
public void testFindSpecial0() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("findSpecial");
    testFindSpecial(SubExample.class, Example.class, void.class, false, "v0");
    testFindSpecial(SubExample.class, Example.class, void.class, false, "pkg_v0");
    testFindSpecial(RemoteExample.class, PubExample.class, void.class, false, "Pub/pro_v0");
    testFindSpecial(Example.class, IntExample.class, void.class, true, "vd");
    // Do some negative testing:
    for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
        testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "bogus");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", Void.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
        testFindSpecial(false, lookup, Example.class, IntExample.class, void.class, "v0");
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:MethodHandlesTest.java

示例3: testFindSpecial

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
void testFindSpecial(Class<?> specialCaller,
                     Class<?> defc, Class<?> ret, boolean dflt, String name, Class<?>... params) throws Throwable {
    if (specialCaller == RemoteExample.class) {
        testFindSpecial(false, EXAMPLE,  specialCaller, defc, ret, name, params);
        testFindSpecial(false, PRIVATE,  specialCaller, defc, ret, name, params);
        testFindSpecial(false, PACKAGE,  specialCaller, defc, ret, name, params);
        testFindSpecial(true,  SUBCLASS, specialCaller, defc, ret, name, params);
        testFindSpecial(false, PUBLIC,   specialCaller, defc, ret, name, params);
        return;
    }
    testFindSpecial(true,          EXAMPLE,  specialCaller, defc, ret, name, params);
    testFindSpecial(true,          PRIVATE,  specialCaller, defc, ret, name, params);
    testFindSpecial(false || dflt, PACKAGE,  specialCaller, defc, ret, name, params);
    testFindSpecial(false,         SUBCLASS, specialCaller, defc, ret, name, params);
    testFindSpecial(false,         PUBLIC,   specialCaller, defc, ret, name, params);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:MethodHandlesTest.java

示例4: testFindSpecial

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
@Test
public void testFindSpecial() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("findSpecial");
    testFindSpecial(SubExample.class, Example.class, void.class, "v0");
    testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
    testFindSpecial(RemoteExample.class, PubExample.class, void.class, "Pub/pro_v0");
    // Do some negative testing:
    for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
        testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "bogus");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", Void.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
    }
}
 
开发者ID:infobip,项目名称:infobip-open-jdk-8,代码行数:17,代码来源:MethodHandlesTest.java

示例5: testFindSpecial

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
@Test
public void testFindSpecial() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("findSpecial");
    testFindSpecial(SubExample.class, Example.class, void.class, "v0");
    testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
    testFindSpecial(RemoteExample.class, PubExample.class, void.class, "Pub/pro_v0");
    // Do some negative testing:
    testFindSpecial(false, EXAMPLE, SubExample.class, Example.class, void.class, "bogus");
    testFindSpecial(false, PRIVATE, SubExample.class, Example.class, void.class, "bogus");
    for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
        testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
    }
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:17,代码来源:MethodHandlesTest.java

示例6: testFindSpecial0

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
public void testFindSpecial0() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("findSpecial");
    testFindSpecial(SubExample.class, Example.class, void.class, "v0");
    testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
    testFindSpecial(RemoteExample.class, PubExample.class, void.class, "Pub/pro_v0");
    // Do some negative testing:
    for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
        testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "bogus");
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", Void.class);
        testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:16,代码来源:MethodHandlesTest.java

示例7: testUnreflect0

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
public void testUnreflect0() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("unreflect");
    testUnreflect(Example.class, true, void.class, "s0");
    testUnreflect(Example.class, true, void.class, "pro_s0");
    testUnreflect(Example.class, true, void.class, "pkg_s0");
    testUnreflect(Example.class, true, void.class, "pri_s0");

    testUnreflect(Example.class, true, Object.class, "s1", Object.class);
    testUnreflect(Example.class, true, Object.class, "s2", int.class);
    testUnreflect(Example.class, true, Object.class, "s3", long.class);
    testUnreflect(Example.class, true, Object.class, "s4", int.class, int.class);
    testUnreflect(Example.class, true, Object.class, "s5", long.class, int.class);
    testUnreflect(Example.class, true, Object.class, "s6", int.class, long.class);

    testUnreflect(Example.class, false, void.class, "v0");
    testUnreflect(Example.class, false, void.class, "pkg_v0");
    testUnreflect(Example.class, false, void.class, "pri_v0");
    testUnreflect(Example.class, false, Object.class, "v1", Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", Object.class, Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", Object.class, int.class);
    testUnreflect(Example.class, false, Object.class, "v2", int.class, Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", int.class, int.class);

    // Test a public final member in another package:
    testUnreflect(RemoteExample.class, false, void.class, "Rem/fin_v0");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:28,代码来源:MethodHandlesTest.java

示例8: testUnreflect

import test.java.lang.invoke.remote.RemoteExample; //导入依赖的package包/类
@Test
public void testUnreflect() throws Throwable {
    if (CAN_SKIP_WORKING)  return;
    startTest("unreflect");
    testUnreflect(Example.class, true, void.class, "s0");
    testUnreflect(Example.class, true, void.class, "pro_s0");
    testUnreflect(Example.class, true, void.class, "pkg_s0");
    testUnreflect(Example.class, true, void.class, "pri_s0");

    testUnreflect(Example.class, true, Object.class, "s1", Object.class);
    testUnreflect(Example.class, true, Object.class, "s2", int.class);
    testUnreflect(Example.class, true, Object.class, "s3", long.class);
    testUnreflect(Example.class, true, Object.class, "s4", int.class, int.class);
    testUnreflect(Example.class, true, Object.class, "s5", long.class, int.class);
    testUnreflect(Example.class, true, Object.class, "s6", int.class, long.class);

    testUnreflect(Example.class, false, void.class, "v0");
    testUnreflect(Example.class, false, void.class, "pkg_v0");
    testUnreflect(Example.class, false, void.class, "pri_v0");
    testUnreflect(Example.class, false, Object.class, "v1", Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", Object.class, Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", Object.class, int.class);
    testUnreflect(Example.class, false, Object.class, "v2", int.class, Object.class);
    testUnreflect(Example.class, false, Object.class, "v2", int.class, int.class);

    // Test a public final member in another package:
    testUnreflect(RemoteExample.class, false, void.class, "Rem/fin_v0");
}
 
开发者ID:infobip,项目名称:infobip-open-jdk-8,代码行数:29,代码来源:MethodHandlesTest.java


注:本文中的test.java.lang.invoke.remote.RemoteExample类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。