public class JNINativeMethod
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct JNINativeMethod {
char * name;
char * signature;
void * fnPtr;
}| Modifier and Type | Class and Description |
|---|---|
static class |
JNINativeMethod.Buffer
An array of
JNINativeMethod structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FNPTR
The struct member offsets.
|
static int |
NAME
The struct member offsets.
|
static int |
SIGNATURE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
JNINativeMethod(java.nio.ByteBuffer container)
Creates a
JNINativeMethod instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static JNINativeMethod |
calloc()
Returns a new
JNINativeMethod instance allocated with memCalloc. |
static JNINativeMethod.Buffer |
calloc(int capacity)
Returns a new
JNINativeMethod.Buffer instance allocated with memCalloc. |
static JNINativeMethod |
callocStack()
Returns a new
JNINativeMethod instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static JNINativeMethod.Buffer |
callocStack(int capacity)
Returns a new
JNINativeMethod.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static JNINativeMethod.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
JNINativeMethod.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static JNINativeMethod |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
JNINativeMethod instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static JNINativeMethod |
create()
Returns a new
JNINativeMethod instance allocated with BufferUtils. |
static JNINativeMethod.Buffer |
create(int capacity)
Returns a new
JNINativeMethod.Buffer instance allocated with BufferUtils. |
static JNINativeMethod |
create(long address)
Returns a new
JNINativeMethod instance for the specified memory address. |
static JNINativeMethod.Buffer |
create(long address,
int capacity)
Create a
JNINativeMethod.Buffer instance at the specified memory. |
static JNINativeMethod |
createSafe(long address)
|
static JNINativeMethod.Buffer |
createSafe(long address,
int capacity)
|
long |
fnPtr()
Returns the value of the
fnPtr field. |
JNINativeMethod |
fnPtr(long value)
Sets the specified value to the
fnPtr field. |
static JNINativeMethod |
malloc()
Returns a new
JNINativeMethod instance allocated with memAlloc. |
static JNINativeMethod.Buffer |
malloc(int capacity)
Returns a new
JNINativeMethod.Buffer instance allocated with memAlloc. |
static JNINativeMethod |
mallocStack()
Returns a new
JNINativeMethod instance allocated on the thread-local MemoryStack. |
static JNINativeMethod.Buffer |
mallocStack(int capacity)
Returns a new
JNINativeMethod.Buffer instance allocated on the thread-local MemoryStack. |
static JNINativeMethod.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
JNINativeMethod.Buffer instance allocated on the specified MemoryStack. |
static JNINativeMethod |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
JNINativeMethod instance allocated on the specified MemoryStack. |
java.nio.ByteBuffer |
name()
Returns a
ByteBuffer view of the null-terminated string pointed to by the name field. |
JNINativeMethod |
name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
name field. |
java.lang.String |
nameString()
Decodes the null-terminated string pointed to by the
name field. |
static long |
nfnPtr(long struct)
Unsafe version of
fnPtr(). |
static void |
nfnPtr(long struct,
long value)
Unsafe version of
fnPtr. |
static java.nio.ByteBuffer |
nname(long struct)
Unsafe version of
name(). |
static void |
nname(long struct,
java.nio.ByteBuffer value)
Unsafe version of
name. |
static java.lang.String |
nnameString(long struct)
Unsafe version of
nameString(). |
static java.nio.ByteBuffer |
nsignature(long struct)
Unsafe version of
signature(). |
static void |
nsignature(long struct,
java.nio.ByteBuffer value)
Unsafe version of
signature. |
static java.lang.String |
nsignatureString(long struct)
Unsafe version of
signatureString(). |
JNINativeMethod |
set(java.nio.ByteBuffer name,
java.nio.ByteBuffer signature,
long fnPtr)
Initializes this struct with the specified values.
|
JNINativeMethod |
set(JNINativeMethod src)
Copies the specified struct data to this struct.
|
java.nio.ByteBuffer |
signature()
Returns a
ByteBuffer view of the null-terminated string pointed to by the signature field. |
JNINativeMethod |
signature(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
signature field. |
java.lang.String |
signatureString()
Decodes the null-terminated string pointed to by the
signature field. |
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int NAME
public static final int SIGNATURE
public static final int FNPTR
public JNINativeMethod(java.nio.ByteBuffer container)
JNINativeMethod 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.ByteBuffer name()
ByteBuffer view of the null-terminated string pointed to by the name field.public java.lang.String nameString()
name field.public java.nio.ByteBuffer signature()
ByteBuffer view of the null-terminated string pointed to by the signature field.public java.lang.String signatureString()
signature field.public long fnPtr()
fnPtr field.public JNINativeMethod name(java.nio.ByteBuffer value)
name field.public JNINativeMethod signature(java.nio.ByteBuffer value)
signature field.public JNINativeMethod fnPtr(long value)
fnPtr field.public JNINativeMethod set(java.nio.ByteBuffer name, java.nio.ByteBuffer signature, long fnPtr)
public JNINativeMethod set(JNINativeMethod src)
src - the source structpublic static JNINativeMethod malloc()
JNINativeMethod instance allocated with memAlloc. The instance must be explicitly freed.public static JNINativeMethod calloc()
JNINativeMethod instance allocated with memCalloc. The instance must be explicitly freed.public static JNINativeMethod create()
JNINativeMethod instance allocated with BufferUtils.public static JNINativeMethod create(long address)
JNINativeMethod instance for the specified memory address.@Nullable public static JNINativeMethod createSafe(long address)
public static JNINativeMethod.Buffer malloc(int capacity)
JNINativeMethod.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static JNINativeMethod.Buffer calloc(int capacity)
JNINativeMethod.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static JNINativeMethod.Buffer create(int capacity)
JNINativeMethod.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static JNINativeMethod.Buffer create(long address, int capacity)
JNINativeMethod.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static JNINativeMethod.Buffer createSafe(long address, int capacity)
public static JNINativeMethod mallocStack()
JNINativeMethod instance allocated on the thread-local MemoryStack.public static JNINativeMethod callocStack()
JNINativeMethod instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static JNINativeMethod mallocStack(org.lwjgl.system.MemoryStack stack)
JNINativeMethod instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static JNINativeMethod callocStack(org.lwjgl.system.MemoryStack stack)
JNINativeMethod instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static JNINativeMethod.Buffer mallocStack(int capacity)
JNINativeMethod.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static JNINativeMethod.Buffer callocStack(int capacity)
JNINativeMethod.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static JNINativeMethod.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
JNINativeMethod.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static JNINativeMethod.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
JNINativeMethod.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static java.nio.ByteBuffer nname(long struct)
name().public static java.lang.String nnameString(long struct)
nameString().public static java.nio.ByteBuffer nsignature(long struct)
signature().public static java.lang.String nsignatureString(long struct)
signatureString().public static long nfnPtr(long struct)
fnPtr().public static void nname(long struct,
java.nio.ByteBuffer value)
name.public static void nsignature(long struct,
java.nio.ByteBuffer value)
signature.public static void nfnPtr(long struct,
long value)
fnPtr.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.