Package cdc.deps.java

Class DJavaAnalyzer

  • Direct Known Subclasses:
    AsmJavaAnalyzer

    public abstract class DJavaAnalyzer
    extends Object
    Base class for analyzers of Java dependencies.
    Author:
    Damien Carbonne
    • Constructor Detail

      • DJavaAnalyzer

        protected DJavaAnalyzer()
    • Method Detail

      • log

        protected void log​(String message)
      • analyzeClassFile

        public final void analyzeClassFile​(File file)
                                    throws Exception
        Analyzes one class file.

        A CLASS_FILE group is associated to analysis result.

        Parameters:
        file - File to analyze.
        Throws:
        Exception - When any exception occurs.
      • analyzeClassPath

        public final void analyzeClassPath​(File classpath)
                                    throws Exception
        Analyzes all class files contained (directly or not) under a directory.
        Parameters:
        classpath - Name of the directory to analyze.
        Throws:
        Exception - When any exception occurs.
      • analyzeJarFile

        public final void analyzeJarFile​(File jar)
                                  throws Exception
        Analyzes all class files contained in a jar file.
        Parameters:
        jar - Jar file.
        Throws:
        Exception - When any exception occurs.
      • postAnalysis

        public void postAnalysis()
      • analyzeClassFile

        protected abstract void analyzeClassFile​(cdc.deps.DGroup group,
                                                 InputStream is)
        Analyzes a class file.
        Parameters:
        group - Group associated to the class file. Its scope should be set to INTERNAL and its category to CATEGORY_CLASS_FILE.
        is - InputStream of the class file.