public class FFITypeFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FFITypeFactory.ParameterizedTypeImpl |
| Constructor and Description |
|---|
FFITypeFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
findNativeLibrary(Class<?> clazz,
String libraryName) |
static <T> T |
getFactory(Class<?> ffiType)
Get the factory from the FFIType.
|
static <T> T |
getFactory(Class<?> ffiType,
String ffiTypeName) |
static <T> T |
getFactory(Class<T> factoryType,
Class<?> ffiType) |
static <T> T |
getFactory(String ffiTypeName) |
static FFIByteString.Factory |
getFFIByteStringFactory() |
static String |
getFFITypeName(Type ffiType,
boolean useDefaultMapping) |
static <T extends FFIVector.Factory> |
getFFIVectorFactory(Type elementType)
accept primitive types, boxed primitive types, and
|
static <T> T |
getLibrary(Class<T> libraryInterface) |
static <T> T |
getLibrary(Class<T> libraryInterface,
String ffiLibraryName)
Get the FFILibrary with the given library interface and ffi name
|
static Class<?> |
getType(Class<?> ffiType) |
static Class<?> |
getType(Class<?> ffiType,
String ffiTypeName) |
static Class<?> |
getType(String ffiTypeName) |
static void |
loadClassLoader(ClassLoader classLoader) |
static ParameterizedType |
makeParameterizedType(Class<?> rawType,
Type... arguments) |
static FFIByteString |
newByteString() |
static <E> FFIVector<E> |
newFFIVector(Type elementType)
As slow as reflection
|
static void |
unloadClassLoader(ClassLoader classLoader) |
public static void loadClassLoader(ClassLoader classLoader)
public static void unloadClassLoader(ClassLoader classLoader)
public static Class<?> getType(String ffiTypeName) throws ClassNotFoundException
ClassNotFoundExceptionpublic static Class<?> getType(Class<?> ffiType) throws ClassNotFoundException
ClassNotFoundExceptionpublic static ParameterizedType makeParameterizedType(Class<?> rawType, Type... arguments)
public static Class<?> getType(Class<?> ffiType, String ffiTypeName) throws ClassNotFoundException
ClassNotFoundExceptionpublic static <T> T getFactory(String ffiTypeName)
public static <T> T getFactory(Class<?> ffiType)
T - ffiType - public static <T> T getLibrary(Class<T> libraryInterface)
public static <T> T getLibrary(Class<T> libraryInterface, String ffiLibraryName)
T - libraryInterface - ffiLibraryName - public static FFIByteString newByteString()
public static FFIByteString.Factory getFFIByteStringFactory()
public static <E> FFIVector<E> newFFIVector(Type elementType)
E - elementType - public static <T extends FFIVector.Factory> T getFFIVectorFactory(Type elementType)
T - elementType - Copyright © 2022 Alibaba Group Holding Ltd.. All rights reserved.