Class Analyzer
java.lang.Object
de.uni_hildesheim.sse.easy.loader.AbstractLoader
de.uni_hildesheim.sse.easy.loader.Analyzer
Provides a bundle analysis on top of the EASy loader.
- Author:
- Holger Eichelberger
-
Field Summary
Fields inherited from class de.uni_hildesheim.sse.easy.loader.AbstractLoader
EASY_EXCLUSION_PATTERN, EASY_INCLUSION_PATTERN, TAG_EASY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanalyze()Performs a default analysis of the bundles such as cyclic dependencies, overlapping files, missing bundles.private booleananalyzeJarForDuplicates(BundleInfo info, Map<String, BundleInfo> names) Analyzes the resolved Jar ofinfofor duplicate files.static voidStarts the analyzer.private voidPrints a list of data with indent.private booleanprintBundles(List<BundleInfo> infos, String indent, String headline, String stopMessage, boolean negate) Analyzes bundles and prints them in case of failure (i.e.,infosis not empty).protected booleanprintDuplicateFiles(List<BundleInfo> infos) Prints duplicate files in JARs.Methods inherited from class de.uni_hildesheim.sse.easy.loader.AbstractLoader
bootstrap, collectBootstrapData, genericBootstrap, getBase, getUiBundles, initializeRegistry, irrelevantInJar, notifyMapping, printDependencies, simpleBootstrap
-
Constructor Details
-
Analyzer
public Analyzer()Creates a new analyzer with default base ".". -
Analyzer
Creates a new analyzer.- Parameters:
base- the base folder where the plugins are located in
-
-
Method Details
-
main
Starts the analyzer.- Parameters:
args- ignored
-
analyze
public void analyze()Performs a default analysis of the bundles such as cyclic dependencies, overlapping files, missing bundles. -
printDuplicateFiles
Prints duplicate files in JARs.- Parameters:
infos- the bundle information objects to be analyzed- Returns:
trueif duplicates were found,falseelse
-
analyzeJarForDuplicates
Analyzes the resolved Jar ofinfofor duplicate files.- Parameters:
info- the bundle information object (must have a resolved jar)names- already known name-bundle mappings (modified as a side effect)- Returns:
trueif duplicates were found,falseelse
-
printBundles
private boolean printBundles(List<BundleInfo> infos, String indent, String headline, String stopMessage, boolean negate) Analyzes bundles and prints them in case of failure (i.e.,infosis not empty).- Parameters:
infos- the information objects to be analyzedindent- indentation of the dataheadline- headline to be printedstopMessage- the message to be printed in case that a failure is detectednegate- negate the failure test, i.e., test for emptyinfos- Returns:
truein case of failure,falseelse
-
print
Prints a list of data with indent.- Parameters:
data- the data to be printedindent- the indentation
-