addExclusions() — netty Function Reference
Architecture documentation for the addExclusions() function in ResourceLeakDetector.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b260358b_454b_6028_886c_2ef501a3d816["addExclusions()"] f4ad5acd_fee3_2377_9c2f_bc298798ad25["ResourceLeakDetector"] b260358b_454b_6028_886c_2ef501a3d816 -->|defined in| f4ad5acd_fee3_2377_9c2f_bc298798ad25 d26368ea_2377_6726_9fe5_56eb62b032f5["String()"] d26368ea_2377_6726_9fe5_56eb62b032f5 -->|calls| b260358b_454b_6028_886c_2ef501a3d816 style b260358b_454b_6028_886c_2ef501a3d816 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/ResourceLeakDetector.java lines 644–666
public static void addExclusions(@SuppressWarnings("rawtypes") Class clz, String ... methodNames) {
Set<String> nameSet = new HashSet<>(Arrays.asList(methodNames));
// Use loop rather than lookup. This avoids knowing the parameters, and doesn't have to handle
// NoSuchMethodException.
for (Method method : clz.getDeclaredMethods()) {
if (nameSet.remove(method.getName()) && nameSet.isEmpty()) {
break;
}
}
if (!nameSet.isEmpty()) {
throw new IllegalArgumentException("Can't find '" + nameSet + "' in " + clz.getName());
}
String[] oldMethods;
String[] newMethods;
do {
oldMethods = excludedMethods.get();
newMethods = Arrays.copyOf(oldMethods, oldMethods.length + 2 * methodNames.length);
for (int i = 0; i < methodNames.length; i++) {
newMethods[oldMethods.length + i * 2] = clz.getName();
newMethods[oldMethods.length + i * 2 + 1] = methodNames[i];
}
} while (!excludedMethods.compareAndSet(oldMethods, newMethods));
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does addExclusions() do?
addExclusions() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/ResourceLeakDetector.java.
Where is addExclusions() defined?
addExclusions() is defined in common/src/main/java/io/netty/util/ResourceLeakDetector.java at line 644.
What calls addExclusions()?
addExclusions() is called by 1 function(s): String.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free