Class WarAnalyzer

  • All Implemented Interfaces:
    Callable<FileAnalyzer>, FileAnalyzer, JarEntryWriter

    @NotThreadSafe
    public class WarAnalyzer
    extends JarAnalyzer
    Analyzes a single Web app archive (WAR) as to identify (and potentially instrument) all its classes (in directory WEB-INF/classes), as well as its JARs (in directory WEB-INF/lib).
    • Constructor Detail

      • WarAnalyzer

        public WarAnalyzer()
    • Method Detail

      • setIncludeDir

        public void setIncludeDir​(Path _p)
        Sets the directory containing JARs to be included in the rewritten WAR. All JARs contained therein will be modified as well in order to set the application scope in the Vulas configuration file.
        Parameters:
        _p - a Path object.
      • setRename

        public void setRename​(boolean _b)
        Determines whether the instrumented JAR is renamed or not. If yes, the new file name follows the following format: - If app context is provided: [originalJarName]-vulas-[appGroupId]-[appArtifactId]-[appVersion].jar - Otherwise: [originalJarName]-vulas-instr.jar Determines whether the instrumented JAR is renamed or not. If yes, the new file name follows the following format: - If app context is provided: [originalJarName]-vulas-[appGroupId]-[appArtifactId]-[appVersion].jar - Otherwise: [originalJarName]-vulas.jar
        Overrides:
        setRename in class JarAnalyzer
        Parameters:
        _b - a boolean.
      • getConstructIds

        public Set<ConstructId> getConstructIds()
        Identifies all ConstructIds of all methods and constructors. Identifies all ConstructIds of all methods and constructors contained in the WAR file. Returns true if the WAR has classes in WEB-INF/classes, false otherwise. Note that classes in libraries contained in WEB-INF/lib are ignored.
        Overrides:
        getConstructIds in class JarAnalyzer
        Returns:
        a Set object.