Class ReferenceMatcher
java.lang.Object
io.opentelemetry.javaagent.tooling.muzzle.ReferenceMatcher
Matches a set of references against a class loader.
-
Method Summary
Modifier and TypeMethodDescriptionLoads the full list of mismatches.booleanmatches(ClassLoader loader) Matcher used by ByteBuddy.static ReferenceMatcherof(io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule instrumentationModule)
-
Method Details
-
of
public static ReferenceMatcher of(io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule instrumentationModule) -
matches
Matcher used by ByteBuddy. Caller is expected to cache the result if this method is called multiple times for given class loader.- Parameters:
loader- Classloader to validate against (cannot benull, must pass "bootstrap proxy" instead of bootstrap class loader)- Returns:
- true if all references match the classpath of loader
-
getMismatchedReferenceSources
Loads the full list of mismatches. Used in debug contexts only.- Parameters:
loader- Classloader to validate against (cannot benull, must pass "bootstrap * proxy" instead of bootstrap class loader)- Returns:
- A list of all mismatches between this ReferenceMatcher and loader's classpath.
-