本文整理汇总了Java中java.lang.invoke.MethodHandles.byteArrayViewVarHandle方法的典型用法代码示例。如果您正苦于以下问题:Java MethodHandles.byteArrayViewVarHandle方法的具体用法?Java MethodHandles.byteArrayViewVarHandle怎么用?Java MethodHandles.byteArrayViewVarHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.lang.invoke.MethodHandles
的用法示例。
在下文中一共展示了MethodHandles.byteArrayViewVarHandle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(double[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(double[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}
示例2: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(long[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(long[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}
示例3: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(float[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(float[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}
示例4: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(int[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(int[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}
示例5: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(char[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(char[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}
示例6: setupVarHandleSources
import java.lang.invoke.MethodHandles; //导入方法依赖的package包/类
@Override
public void setupVarHandleSources() {
// Combinations of VarHandle byte[] or ByteBuffer
vhss = new ArrayList<>();
for (MemoryMode endianess : Arrays.asList(MemoryMode.BIG_ENDIAN, MemoryMode.LITTLE_ENDIAN)) {
ByteOrder bo = endianess == MemoryMode.BIG_ENDIAN
? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
VarHandleSource aeh = new VarHandleSource(
MethodHandles.byteArrayViewVarHandle(short[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(aeh);
VarHandleSource bbh = new VarHandleSource(
MethodHandles.byteBufferViewVarHandle(short[].class, bo),
endianess, MemoryMode.READ_WRITE);
vhss.add(bbh);
}
}