Method names in this class are prefixed with api to avoid ambiguities when used with static imports.
Configuration#DEBUG_STREAM
| Modifier and Type | Class and Description |
|---|---|
| public static class | APIUtil.
A data class for API versioning information. |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| public static final PrintStream | DEBUG_STREAM
The |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the pointer array address on the stackthe stack to use stack, long... the pointer addresses to store addresses)Stores the specified array of pointer addresses on the specified |
| public static long | Returns: the pointer array address on the stackthe stack to use stack, ByteBuffer... the buffers to store buffers)Stores the addresses of the specified array of buffers on the specified |
| public static long | Returns: the pointer array address on the stackthe stack to use stack, APIUtil.the encoder to use encoder,the strings to encode strings)Encodes the specified strings with the specified |
| public static void | apiArrayFree(long
the pointer array to free pointers, int the pointer array length length)Frees the specified array of pointers. |
| public static long | Returns: the pointer array address on the stackthe stack to use stack, APIUtil.the encoder to use encoder,the strings to encode strings)Encodes the specified strings with the specified |
| public static long | Returns: the pointer array address on the stackthe stack to use stack, ByteBuffer... the buffers to store buffers)Stores the addresses of the specified array of buffers on the specified |
| public static long | Returns: the pointer array address on the stackthe stack to use stack, APIUtil.the encoder to use encoder,the strings to encode strings)Encodes the specified strings with the specified |
| public static long | |
| public static Map | Returns: the token mapthe filter to use (optional) filter, Map<Integer, String> the target map (optional) target, Class<?>... the classes to get tokens from tokenClasses)Returns a map of public static final integer fields in the specified classes, to their String representations. |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static FFIType | |
| public static FFICIF | |
| public static FFICIF | apiCreateCIFVar(int abi, int nfixedargs, FFIType rtype, FFIType... atypes)
Allocates and prepares a libffi var CIF. |
| public static SharedLibrary | |
| public static FFIType | |
| public static FFIType | |
| public static void | |
| public static String | |
| public static long | |
| public static long | |
| public static long | |
| public static ByteBuffer | |
| public static void | apiLog(CharSequence
the message to print msg)Prints the specified message to the |
| public static void | |
| public static void | apiLogMore(CharSequence
the message to print, in continuation of a previous message msg)Same as |
| public static APIUtil. | apiParseVersion(Configuration<?>
the option to query option)Returns the |
| public static APIUtil. | Returns: the parsedAPIVersionthe version string version)Parses a version string. |
| public static int | |
| public static String | |
| public static String | |
| private static PrintStream | |
| private static void | |
| private static FFIType | |
| private static void |
| API_VERSION_PATTERN | back to summary |
|---|---|
| private static final Pattern API_VERSION_PATTERN | |
| DEBUG_STREAM | back to summary |
|---|---|
| public static final PrintStream DEBUG_STREAM The | |
| APIUtil | back to summary |
|---|---|
| private APIUtil() | |
| apiArray | back to summary |
|---|---|
| public static long apiArray(MemoryStack stack, long... addresses) Stores the specified array of pointer addresses on the specified
| |
| apiArray | back to summary |
|---|---|
| public static long apiArray(MemoryStack stack, ByteBuffer... buffers) Stores the addresses of the specified array of buffers on the specified
| |
| apiArray | back to summary |
|---|---|
| public static long apiArray(MemoryStack stack, APIUtil. Encodes the specified strings with the specified
| |
| apiArrayFree | back to summary |
|---|---|
| public static void apiArrayFree(long pointers, int length) Frees the specified array of pointers.
| |
| apiArrayi | back to summary |
|---|---|
| public static long apiArrayi(MemoryStack stack, APIUtil. Encodes the specified strings with the specified The encoded buffers must be freed with
| |
| apiArrayp | back to summary |
|---|---|
| public static long apiArrayp(MemoryStack stack, ByteBuffer... buffers) Stores the addresses of the specified array of buffers on the specified
| |
| apiArrayp | back to summary |
|---|---|
| public static long apiArrayp(MemoryStack stack, APIUtil. Encodes the specified strings with the specified The encoded buffers must be freed with
| |
| apiCheckAllocation | back to summary |
|---|---|
| public static long apiCheckAllocation(int elements, long bytes, long maxBytes) | |
| apiClassTokens | back to summary |
|---|---|
| public static Map Returns a map of public static final integer fields in the specified classes, to their String representations. An optional filter can be specified to only include specific fields. The target map may be null, in which case a new map is allocated and returned. This method is useful when debugging to quickly identify values returned from an API. | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, boolean __result) | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, byte __result) | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, short __result) | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, int __result) | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, float __result) | |
| apiClosureRet | back to summary |
|---|---|
| public static void apiClosureRet(long ret, double __result) | |
| apiClosureRetL | back to summary |
|---|---|
| public static void apiClosureRetL(long ret, long __result) | |
| apiClosureRetP | back to summary |
|---|---|
| public static void apiClosureRetP(long ret, long __result) | |
| apiCreateArray | back to summary |
|---|---|
| public static FFIType apiCreateArray(FFIType type, int length) | |
| apiCreateCIF | back to summary |
|---|---|
| public static FFICIF apiCreateCIF(int abi, FFIType rtype, FFIType... atypes) Allocates and prepares a libffi CIF. | |
| apiCreateCIFVar | back to summary |
|---|---|
| public static FFICIF apiCreateCIFVar(int abi, int nfixedargs, FFIType rtype, FFIType... atypes) Allocates and prepares a libffi var CIF. | |
| apiCreateLibrary | back to summary |
|---|---|
| public static SharedLibrary apiCreateLibrary(String name) | |
| apiCreateStruct | back to summary |
|---|---|
| public static FFIType apiCreateStruct(FFIType... members) | |
| apiCreateUnion | back to summary |
|---|---|
| public static FFIType apiCreateUnion(FFIType... members) | |
| apiFilterExtensions | back to summary |
|---|---|
| public static void apiFilterExtensions(Set<String> extensions, Configuration<Object> option) | |
| apiFindLibrary | back to summary |
|---|---|
| public static String apiFindLibrary(String start, String name) | |
| apiGetBytes | back to summary |
|---|---|
| public static long apiGetBytes(int elements, int elementShift) | |
| apiGetFunctionAddress | back to summary |
|---|---|
| public static long apiGetFunctionAddress(FunctionProvider provider, String functionName) | |
| apiGetFunctionAddressOptional | back to summary |
|---|---|
| public static long apiGetFunctionAddressOptional(SharedLibrary library, String functionName) | |
| apiGetMappedBuffer | back to summary |
|---|---|
public static ByteBuffer apiGetMappedBuffer(ByteBuffer buffer, long mappedAddress, int capacity)
| |
| apiLog | back to summary |
|---|---|
| public static void apiLog(CharSequence msg) Prints the specified message to the
| |
| apiLogMissing | back to summary |
|---|---|
| public static void apiLogMissing(String api, ByteBuffer functionName) | |
| apiLogMore | back to summary |
|---|---|
| public static void apiLogMore(CharSequence msg) Same as
| |
| apiParseVersion | back to summary |
|---|---|
| public static APIUtil. Returns the
| |
| apiParseVersion | back to summary |
|---|---|
| public static APIUtil. Parses a version string. The version string must have the format
| |
| apiStdcall | back to summary |
|---|---|
| public static int apiStdcall() | |
| apiUnknownToken | back to summary |
|---|---|
| public static String apiUnknownToken(int token) | |
| apiUnknownToken | back to summary |
|---|---|
| public static String apiUnknownToken(String description, int token) | |
| getDebugStream | back to summary |
|---|---|
private static PrintStream getDebugStream()
| |
| optionalFunctionMissing | back to summary |
|---|---|
| private static void optionalFunctionMissing(SharedLibrary library, String functionName) | |
| prep | back to summary |
|---|---|
| private static FFIType prep(FFIType type) | |
| requiredFunctionMissing | back to summary |
|---|---|
| private static void requiredFunctionMissing(String functionName) | |
| Modifier and Type | Field and Description |
|---|---|
| public final String | implementation
Returns the API implementation-specific versioning information. |
| public final int | major
Returns the API major version. |
| public final int | minor
Returns the API minor version. |
| public final String | revision
Returns the API revision. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(APIUtil.
the object to be compared. otherImplements java. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public String |
| implementation | back to summary |
|---|---|
| public final String implementation Returns the API implementation-specific versioning information. May be null. | |
| major | back to summary |
|---|---|
| public final int major Returns the API major version. | |
| minor | back to summary |
|---|---|
| public final int minor Returns the API minor version. | |
| revision | back to summary |
|---|---|
| public final String revision Returns the API revision. May be null. | |
| APIVersion | back to summary |
|---|---|
| public APIVersion(int major, int minor) | |
| APIVersion | back to summary |
|---|---|
| public APIVersion(int major, int minor, String revision, String implementation) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(APIUtil. Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer |
| encode | back to summary |
|---|---|
| public ByteBuffer encode(CharSequence text, boolean nullTerminated) | |