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


Java MethodHandles.arrayElementVarHandle方法代码示例

本文整理汇总了Java中java.lang.invoke.MethodHandles.arrayElementVarHandle方法的典型用法代码示例。如果您正苦于以下问题:Java MethodHandles.arrayElementVarHandle方法的具体用法?Java MethodHandles.arrayElementVarHandle怎么用?Java MethodHandles.arrayElementVarHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.lang.invoke.MethodHandles的用法示例。


在下文中一共展示了MethodHandles.arrayElementVarHandle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessInt.class, "final_v", int.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessInt.class, "v", int.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessInt.class, "static_final_v", int.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessInt.class, "static_v", int.class);

    vhArray = MethodHandles.arrayElementVarHandle(int[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodHandleAccessInt.java

示例2: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeShort.class, "final_v", short.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeShort.class, "v", short.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeShort.class, "static_final_v", short.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeShort.class, "static_v", short.class);

    vhArray = MethodHandles.arrayElementVarHandle(short[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeShort.java

示例3: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessLong.class, "final_v", long.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessLong.class, "v", long.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessLong.class, "static_final_v", long.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessLong.class, "static_v", long.class);

    vhArray = MethodHandles.arrayElementVarHandle(long[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestAccessLong.java

示例4: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessLong.class, "final_v", long.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessLong.class, "v", long.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessLong.class, "static_final_v", long.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessLong.class, "static_v", long.class);

    vhArray = MethodHandles.arrayElementVarHandle(long[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodHandleAccessLong.java

示例5: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessString.class, "final_v", String.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessString.class, "v", String.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessString.class, "static_final_v", String.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessString.class, "static_v", String.class);

    vhArray = MethodHandles.arrayElementVarHandle(String[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodHandleAccessString.java

示例6: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessFloat.class, "final_v", float.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodHandleAccessFloat.class, "v", float.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessFloat.class, "static_final_v", float.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodHandleAccessFloat.class, "static_v", float.class);

    vhArray = MethodHandles.arrayElementVarHandle(float[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodHandleAccessFloat.java

示例7: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessChar.class, "final_v", char.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessChar.class, "v", char.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessChar.class, "static_final_v", char.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessChar.class, "static_v", char.class);

    vhArray = MethodHandles.arrayElementVarHandle(char[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestAccessChar.java

示例8: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessBoolean.class, "final_v", boolean.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessBoolean.class, "v", boolean.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessBoolean.class, "static_final_v", boolean.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessBoolean.class, "static_v", boolean.class);

    vhArray = MethodHandles.arrayElementVarHandle(boolean[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestAccessBoolean.java

示例9: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeString.class, "final_v", String.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeString.class, "v", String.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeString.class, "static_final_v", String.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeString.class, "static_v", String.class);

    vhArray = MethodHandles.arrayElementVarHandle(String[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeString.java

示例10: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeDouble.class, "final_v", double.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeDouble.class, "v", double.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeDouble.class, "static_final_v", double.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeDouble.class, "static_v", double.class);

    vhArray = MethodHandles.arrayElementVarHandle(double[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeDouble.java

示例11: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessString.class, "final_v", String.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessString.class, "v", String.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessString.class, "static_final_v", String.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessString.class, "static_v", String.class);

    vhArray = MethodHandles.arrayElementVarHandle(String[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestAccessString.java

示例12: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeFloat.class, "final_v", float.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeFloat.class, "v", float.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeFloat.class, "static_final_v", float.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeFloat.class, "static_v", float.class);

    vhArray = MethodHandles.arrayElementVarHandle(float[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeFloat.java

示例13: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessInt.class, "final_v", int.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestAccessInt.class, "v", int.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessInt.class, "static_final_v", int.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestAccessInt.class, "static_v", int.class);

    vhArray = MethodHandles.arrayElementVarHandle(int[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestAccessInt.java

示例14: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeInt.class, "final_v", int.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeInt.class, "v", int.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeInt.class, "static_final_v", int.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeInt.class, "static_v", int.class);

    vhArray = MethodHandles.arrayElementVarHandle(int[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeInt.java

示例15: setup

import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@BeforeClass
public void setup() throws Exception {
    vhFinalField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeByte.class, "final_v", byte.class);

    vhField = MethodHandles.lookup().findVarHandle(
            VarHandleTestMethodTypeByte.class, "v", byte.class);

    vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeByte.class, "static_final_v", byte.class);

    vhStaticField = MethodHandles.lookup().findStaticVarHandle(
        VarHandleTestMethodTypeByte.class, "static_v", byte.class);

    vhArray = MethodHandles.arrayElementVarHandle(byte[].class);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:VarHandleTestMethodTypeByte.java


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