Package 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
The Class GUID.
- Author:
- Tobias Wolf, wolf.tobias@gmx.net
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Class ByReference.static classNested classes/interfaces inherited from class com.sun.jna.Structure
Structure.FieldOrder, Structure.StructField -
Field Summary
FieldsModifier and TypeFieldDescriptionintThe Data1.shortThe Data2.shortThe Data3.byte[]The Data4.Fields inherited from class com.sun.jna.Structure
ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Guid.GUIDfromBinary(byte[] data) From binary.static Guid.GUIDfromString(String guid) From string.inthashCode()static Guid.GUIDnewGuid()Generates a new guid.byte[]To byte array.The value of this Guid, formatted as follows: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.protected voidWrite fields to backing memory.Methods inherited from class com.sun.jna.Structure
allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
-
Field Details
-
Data1
public int Data1The Data1. -
Data2
public short Data2The Data2. -
Data3
public short Data3The Data3. -
Data4
public byte[] Data4The Data4.
-
-
Constructor Details
-
GUID
public GUID()Instantiates a new guid. -
GUID
Instantiates a new guid.- Parameters:
guid- the guid
-
GUID
Instantiates a new guid.- Parameters:
guid- the guid
-
GUID
public GUID(byte[] data) Instantiates a new guid.- Parameters:
data- the data
-
GUID
Instantiates a new guid.- Parameters:
memory- the memory
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
fromBinary
From binary.- Parameters:
data- the data- Returns:
- the guid
-
fromString
From string.- Parameters:
guid- the guid- Returns:
- the 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
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.
-