loadLibraryByHelper() — netty Function Reference
Architecture documentation for the loadLibraryByHelper() function in NativeLibraryLoader.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4596d050_35b6_8fd1_9844_425af82366ca["loadLibraryByHelper()"] e940cc67_3be6_5ff3_e560_4d68972dc13b["NativeLibraryLoader"] 4596d050_35b6_8fd1_9844_425af82366ca -->|defined in| e940cc67_3be6_5ff3_e560_4d68972dc13b bafe3f15_b0bf_647a_3a35_cd885f9d3174["loadLibrary()"] bafe3f15_b0bf_647a_3a35_cd885f9d3174 -->|calls| 4596d050_35b6_8fd1_9844_425af82366ca style 4596d050_35b6_8fd1_9844_425af82366ca fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java lines 411–438
private static void loadLibraryByHelper(final Class<?> helper, final String name, final boolean absolute)
throws UnsatisfiedLinkError {
Object ret = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
try {
// Invoke the helper to load the native library, if it succeeds, then the native
// library belong to the specified ClassLoader.
Method method = helper.getMethod("loadLibrary", String.class, boolean.class);
method.setAccessible(true);
return method.invoke(null, name, absolute);
} catch (Exception e) {
return e;
}
}
});
if (ret instanceof Throwable) {
Throwable t = (Throwable) ret;
assert !(t instanceof UnsatisfiedLinkError) : t + " should be a wrapper throwable";
Throwable cause = t.getCause();
if (cause instanceof UnsatisfiedLinkError) {
throw (UnsatisfiedLinkError) cause;
}
UnsatisfiedLinkError ule = new UnsatisfiedLinkError(t.getMessage());
ule.initCause(t);
throw ule;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does loadLibraryByHelper() do?
loadLibraryByHelper() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java.
Where is loadLibraryByHelper() defined?
loadLibraryByHelper() is defined in common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java at line 411.
What calls loadLibraryByHelper()?
loadLibraryByHelper() is called by 1 function(s): loadLibrary.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free