Package cdc.deps.java
Class DJavaAnalyzer
- java.lang.Object
-
- cdc.deps.java.DJavaAnalyzer
-
- Direct Known Subclasses:
AsmJavaAnalyzer
public abstract class DJavaAnalyzer extends Object
Base class for analyzers of Java dependencies.- Author:
- Damien Carbonne
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDJavaAnalyzer.Feature
-
Constructor Summary
Constructors Modifier Constructor Description protectedDJavaAnalyzer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidanalyzeClassFile(cdc.deps.DGroup group, InputStream is)Analyzes a class file.voidanalyzeClassFile(File file)Analyzes one class file.voidanalyzeClassPath(File classpath)Analyzes all class files contained (directly or not) under a directory.voidanalyzeJarFile(File jar)Analyzes all class files contained in a jar file.DJavaAnalysisgetAnalysis()booleanisEnabled(DJavaAnalyzer.Feature feature)protected voidlog(String message)voidpostAnalysis()voidsetEnabled(DJavaAnalyzer.Feature feature, boolean enabled)
-
-
-
Method Detail
-
log
protected void log(String message)
-
setEnabled
public final void setEnabled(DJavaAnalyzer.Feature feature, boolean enabled)
-
isEnabled
public final boolean isEnabled(DJavaAnalyzer.Feature feature)
-
getAnalysis
public final DJavaAnalysis getAnalysis()
-
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.
-
-