Class ASMDependencyAnalyzer

java.lang.Object
org.apache.maven.shared.dependency.analyzer.asm.ASMDependencyAnalyzer
All Implemented Interfaces:
DependencyAnalyzer

@Named @Singleton public class ASMDependencyAnalyzer extends Object implements DependencyAnalyzer
ASMDependencyAnalyzer
Author:
Mark Hobson
  • Constructor Details

    • ASMDependencyAnalyzer

      public ASMDependencyAnalyzer()
  • Method Details

    • analyzeUsages

      public Set<DependencyUsage> analyzeUsages(ClassEntrySource source, ClassesPatterns excludeClasses) throws IOException
      Analyzes usages in the classes exposed by a source. Uses the same visitor as the URL form.
      Parameters:
      source - the class entry source to analyze
      excludeClasses - patterns of classes to exclude
      Returns:
      the referenced classes and their declaring classes
      Throws:
      IOException - if the source cannot be read
      Since:
      1.18.0
    • analyzeUsages

      public Set<DependencyUsage> analyzeUsages(URL url, ClassesPatterns excludeClasses) throws IOException
      Description copied from interface: DependencyAnalyzer

      analyzeUsages.

      Specified by:
      analyzeUsages in interface DependencyAnalyzer
      Parameters:
      url - the JAR file or directory to analyze
      excludeClasses - patterns of classes to exclude
      Returns:
      the set of class names referenced by the library, paired with the classes declaring those references.
      Throws:
      IOException - if an error occurs reading a JAR or .class file