本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}