Class ReferenceMatcher


  • public final class ReferenceMatcher
    extends Object
    Matches a set of references against a classloader.
    • Constructor Detail

      • ReferenceMatcher

        public ReferenceMatcher​(Reference... references)
      • ReferenceMatcher

        public ReferenceMatcher​(List<String> helperClassNames,
                                Reference[] references)
    • Method Detail

      • 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 (or null for bootstrap)
        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 (or null for bootstrap)
        Returns:
        A list of all mismatches between this ReferenceMatcher and loader's classpath.