Home / Class/ VarHandleByteBufferAccess Class — netty Architecture

VarHandleByteBufferAccess Class — netty Architecture

Architecture documentation for the VarHandleByteBufferAccess class in VarHandleByteBufferAccess.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0145d7c6_3fda_5669_22b7_ff2aa60d0909["VarHandleByteBufferAccess"]
  36b292a0_0c99_0f41_503c_9dd1ae6316bb["VarHandleByteBufferAccess.java"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|defined in| 36b292a0_0c99_0f41_503c_9dd1ae6316bb
  57c574b1_b50f_e3b2_4072_39ddc7344ae5["VarHandleByteBufferAccess()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 57c574b1_b50f_e3b2_4072_39ddc7344ae5
  8b43878e_b2c6_1cc1_084b_db845d7f0ed6["getShortBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 8b43878e_b2c6_1cc1_084b_db845d7f0ed6
  1ff28365_9e60_ad58_9f87_6e01467842dd["setShortBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 1ff28365_9e60_ad58_9f87_6e01467842dd
  7af5646d_c1a0_6ab6_46d1_46db6cc9df0b["getShortLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 7af5646d_c1a0_6ab6_46d1_46db6cc9df0b
  6ee48d39_4c55_9141_1da7_8a557acb2396["setShortLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 6ee48d39_4c55_9141_1da7_8a557acb2396
  7239a937_f1c8_837e_061d_662a2fff99ae["getIntBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 7239a937_f1c8_837e_061d_662a2fff99ae
  19f68a64_d6dc_73a7_f8e4_dfa2900b1a16["setIntBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 19f68a64_d6dc_73a7_f8e4_dfa2900b1a16
  c7505877_77c5_67d8_09ab_40ef4d81df06["getIntLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| c7505877_77c5_67d8_09ab_40ef4d81df06
  97e9092b_c71c_ebfb_0ba7_8cfcccd6e263["setIntLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 97e9092b_c71c_ebfb_0ba7_8cfcccd6e263
  15b6ed95_8321_ddea_c748_d55ac01d81dd["getLongBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 15b6ed95_8321_ddea_c748_d55ac01d81dd
  50960a6e_15bc_3b82_2ff0_671d57ec7914["setLongBE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 50960a6e_15bc_3b82_2ff0_671d57ec7914
  edd54b2f_bbf7_61b5_961e_06f0318d2636["getLongLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| edd54b2f_bbf7_61b5_961e_06f0318d2636
  910e0ece_82b9_ea0f_23a3_b93fd04fa3b0["setLongLE()"]
  0145d7c6_3fda_5669_22b7_ff2aa60d0909 -->|method| 910e0ece_82b9_ea0f_23a3_b93fd04fa3b0

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/VarHandleByteBufferAccess.java lines 29–173

final class VarHandleByteBufferAccess {

    private VarHandleByteBufferAccess() {
    }

    // short (big endian)
    static short getShortBE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (short) PlatformDependent.shortBeByteBufferView().get(buffer, index);
    }

    static void setShortBE(ByteBuffer buffer, int index, int value) {
        //noinspection DataFlowIssue
        PlatformDependent.shortBeByteBufferView().set(buffer, index, (short) value);
    }

    // short (little endian)
    static short getShortLE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (short) PlatformDependent.shortLeByteBufferView().get(buffer, index);
    }

    static void setShortLE(ByteBuffer buffer, int index, int value) {
        //noinspection DataFlowIssue
        PlatformDependent.shortLeByteBufferView().set(buffer, index, (short) value);
    }

    // int (big endian)
    static int getIntBE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (int) PlatformDependent.intBeByteBufferView().get(buffer, index);
    }

    static void setIntBE(ByteBuffer buffer, int index, int value) {
        //noinspection DataFlowIssue
        PlatformDependent.intBeByteBufferView().set(buffer, index, value);
    }

    // int (little endian)
    static int getIntLE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (int) PlatformDependent.intLeByteBufferView().get(buffer, index);
    }

    static void setIntLE(ByteBuffer buffer, int index, int value) {
        //noinspection DataFlowIssue
        PlatformDependent.intLeByteBufferView().set(buffer, index, value);
    }

    // long (big endian)
    static long getLongBE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (long) PlatformDependent.longBeByteBufferView().get(buffer, index);
    }

    static void setLongBE(ByteBuffer buffer, int index, long value) {
        //noinspection DataFlowIssue
        PlatformDependent.longBeByteBufferView().set(buffer, index, value);
    }

    // long (little endian)
    static long getLongLE(ByteBuffer buffer, int index) {
        //noinspection DataFlowIssue
        return (long) PlatformDependent.longLeByteBufferView().get(buffer, index);
    }

    static void setLongLE(ByteBuffer buffer, int index, long value) {
        //noinspection DataFlowIssue
        PlatformDependent.longLeByteBufferView().set(buffer, index, value);
    }

    // --------------------------------------------------------------------
    // byte[] (heap array) accessors
    // These centralize VarHandle.get/set calls for heap arrays as well,
    // so classes like HeapByteBufUtil do not call signature-polymorphic
    // methods directly.
    // Methods must only be called when PlatformDependent.hasVarHandle() is true.
    // --------------------------------------------------------------------

    // short (big endian)
    static short getShortBE(byte[] memory, int index) {

Frequently Asked Questions

What is the VarHandleByteBufferAccess class?
VarHandleByteBufferAccess is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/VarHandleByteBufferAccess.java.
Where is VarHandleByteBufferAccess defined?
VarHandleByteBufferAccess is defined in buffer/src/main/java/io/netty/buffer/VarHandleByteBufferAccess.java at line 29.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free