當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。