Guid.GUID (JNA API)

com.sun.jna.platform.win32

## Class Guid.GUID

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.Guid.GUID

- Direct Known Subclasses:
    Guid.CLSID, Guid.CLSID.ByReference, Guid.GUID.ByReference, Guid.GUID.ByValue, Guid.IID
  Enclosing interface:
    Guid

      public static class Guid.GUID
      extends Structure

  The Class GUID.
  Author:
    Tobias Wolf, wolf.tobias@gmx.net

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Guid.GUID.ByReference` The Class ByReference.
    `static class` | `Guid.GUID.ByValue`

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `Data1` The Data1.
    `short` | `Data2` The Data2.
    `short` | `Data3` The Data3.
    `byte[]` | `Data4` The Data4.

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Guid.GUID()` Instantiates a new guid.
    `Guid.GUID(byte[] data)` Instantiates a new guid.
    `Guid.GUID(Guid.GUID guid)` Instantiates a new guid.
    `Guid.GUID(Pointer memory)` Instantiates a new guid.
    `Guid.GUID(java.lang.String guid)` Instantiates a new guid.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Guid.GUID` | `fromBinary(byte[] data)` From binary.
    `static Guid.GUID` | `fromString(java.lang.String guid)` From string.
    `protected java.util.List` | `getFieldOrder()` Return this Structure's field names in their proper order.
    `static Guid.GUID` | `newGuid()` Generates a new guid.
    `byte[]` | `toByteArray()` To byte array.
    `java.lang.String` | `toGuidString()` The value of this Guid, formatted as follows: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
    `protected void` | `writeFieldsToMemory()` Write fields to backing memory.

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### Data1

          public int Data1

      The Data1.

    - #### Data2

          public short Data2

      The Data2.

    - #### Data3

          public short Data3

      The Data3.

    - #### Data4

          public byte[] Data4

      The Data4.

  - ### Constructor Detail

    - #### Guid.GUID

          public Guid.GUID()

      Instantiates a new guid.

    - #### Guid.GUID

          public Guid.GUID(Guid.GUID guid)

      Instantiates a new guid.
      Parameters:
        `guid` - the guid

    - #### Guid.GUID

          public Guid.GUID(java.lang.String guid)

      Instantiates a new guid.
      Parameters:
        `guid` - the guid

    - #### Guid.GUID

          public Guid.GUID(byte[] data)

      Instantiates a new guid.
      Parameters:
        `data` - the data

    - #### Guid.GUID

          public Guid.GUID(Pointer memory)

      Instantiates a new guid.
      Parameters:
        `memory` - the memory

  - ### Method Detail

    - #### fromBinary

          public static Guid.GUID fromBinary(byte[] data)

      From binary.
      Parameters:
        `data` - the data
      Returns:
        the guid

    - #### fromString

          public static Guid.GUID fromString(java.lang.String guid)

      From string.
      Parameters:
        `guid` - the guid
      Returns:
        the guid

    - #### newGuid

          public static Guid.GUID newGuid()

      Generates a new guid. Code taken from the standard jdk implementation (see UUID class).
      Returns:
        the guid

    - #### toByteArray

          public byte[] toByteArray()

      To byte array.
      Returns:
        the byte[]

    - #### toGuidString

          public java.lang.String toGuidString()

      The value of this Guid, formatted as follows: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
      Returns:
        the string

    - #### writeFieldsToMemory

          protected void writeFieldsToMemory()

      Write fields to backing memory.

    - #### getFieldOrder

          protected java.util.List getFieldOrder()

      Description copied from class: `Structure`
      Return this Structure's field names in their proper order. For example,

           protected List getFieldOrder() {
               return Arrays.asList(new String[] { ... });
           }

      IMPORTANT When deriving from an existing Structure subclass, ensure that you augment the list provided by the superclass, e.g.

           protected List getFieldOrder() {
               List fields = new ArrayList(super.getFieldOrder());
               fields.addAll(Arrays.asList(new String[] { ... }));
               return fields;
           }

      Field order must be explicitly indicated, since the field order as returned by `Class.getFields()` is not guaranteed to be predictable.
      Specified by:
        `getFieldOrder` in class `Structure`
      Returns:
        ordered list of field names

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.