Class LLVMOptRemarkStringRef

  • All Implemented Interfaces:
    Pointer

    public class LLVMOptRemarkStringRef
    extends Struct
    String containing a buffer and a length. The buffer is not guaranteed to be zero-terminated.

    Layout

    
     struct LLVMOptRemarkStringRef {
         char const * Str;
         uint32_t Len;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STR, LEN

        The struct member offsets.
    • Constructor Detail

      • LLVMOptRemarkStringRef

        public LLVMOptRemarkStringRef​(java.nio.ByteBuffer container)
        Creates a LLVMOptRemarkStringRef instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • Str

        public java.nio.ByteBuffer Str()
        Returns a ByteBuffer view of the null-terminated string pointed to by the Str field.
      • StrString

        public java.lang.String StrString()
        Decodes the null-terminated string pointed to by the Str field.
      • Len

        public int Len()
        Returns the value of the Len field.
      • create

        public static LLVMOptRemarkStringRef create​(long address)
        Returns a new LLVMOptRemarkStringRef instance for the specified memory address.
      • createSafe

        @Nullable
        public static LLVMOptRemarkStringRef createSafe​(long address)
        Like create, but returns null if address is NULL.
      • nStr

        public static java.nio.ByteBuffer nStr​(long struct)
        Unsafe version of Str().
      • nStrString

        public static java.lang.String nStrString​(long struct)
        Unsafe version of StrString().
      • nLen

        public static int nLen​(long struct)
        Unsafe version of Len().