Class ReferenceMatcher
- java.lang.Object
-
- io.opentelemetry.javaagent.tooling.muzzle.ReferenceMatcher
-
public final class ReferenceMatcher extends Object
Matches a set of references against a classloader.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Mismatch>getMismatchedReferenceSources(ClassLoader loader)Loads the full list of mismatches.booleanmatches(ClassLoader userClassLoader)Matcher used by ByteBuddy.static ReferenceMatcherof(io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule instrumentationModule)
-
-
-
Method Detail
-
of
public static ReferenceMatcher of(io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule instrumentationModule)
-
matches
public boolean matches(ClassLoader userClassLoader)
Matcher used by ByteBuddy. Fails fast and only caches empty results, or complete results- Parameters:
userClassLoader- 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
public List<Mismatch> getMismatchedReferenceSources(ClassLoader loader)
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.
-
-