本文整理匯總了Java中java.lang.invoke.MethodHandles.byteBufferViewVarHandle方法的典型用法代碼示例。如果您正苦於以下問題:Java MethodHandles.byteBufferViewVarHandle方法的具體用法?Java MethodHandles.byteBufferViewVarHandle怎麽用?Java MethodHandles.byteBufferViewVarHandle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.lang.invoke.MethodHandles
的用法示例。
在下文中一共展示了MethodHandles.byteBufferViewVarHandle方法的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);
}
}