Interface DependencyAnalyzer

  • All Known Implementing Classes:
    ASMDependencyAnalyzer

    public interface DependencyAnalyzer
    Gets the set of classes referenced by a library given either as a jar file or an exploded directory.
    Author:
    Mark Hobson
    • Method Detail

      • analyze

        default java.util.Set<java.lang.String> analyze​(java.net.URL url)
                                                 throws java.io.IOException

        analyze.

        Parameters:
        url - the JAR file or directory to analyze
        Returns:
        the set of class names referenced by the library
        Throws:
        java.io.IOException - if an error occurs reading a JAR or .class file
      • analyze

        default java.util.Set<java.lang.String> analyze​(java.net.URL url,
                                                        ClassesPatterns excludeClasses)
                                                 throws java.io.IOException

        analyze.

        Parameters:
        url - the JAR file or directory to analyze
        excludeClasses - a class list to exclude
        Returns:
        the set of class names referenced by the library
        Throws:
        java.io.IOException - if an error occurs reading a JAR or .class file
      • analyzeUsages

        java.util.Set<DependencyUsage> analyzeUsages​(java.net.URL url,
                                                     ClassesPatterns excludeClasses)
                                              throws java.io.IOException

        analyzeUsages.

        Parameters:
        url - the JAR file or directory to analyze
        Returns:
        the set of class names referenced by the library, paired with the classes declaring those references.
        Throws:
        java.io.IOException - if an error occurs reading a JAR or .class file