com.sun.enterprise.tools.verifier.hk2
Class ModuleDependencyAnalyser

java.lang.Object
  extended by com.sun.enterprise.tools.verifier.hk2.ModuleDependencyAnalyser

public class ModuleDependencyAnalyser
extends Object

Author:
Sanjeeb.Sahoo@Sun.COM

Constructor Summary
ModuleDependencyAnalyser(ModuleDefinition moduleDef, Repository moduleRepository)
          Create a new analyser.
 
Method Summary
 boolean analyse()
          Analyse dependency of a module.
 void excludeClasses(Collection<String> classes)
           
 void excludePackages(Collection<String> packages)
           
 void excludePatterns(Collection<String> patterns)
           
 Map<String,Collection<String>> getResult()
           
 String getResultAsString()
           
static void main(String[] args)
           
 void printResult(PrintStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleDependencyAnalyser

public ModuleDependencyAnalyser(ModuleDefinition moduleDef,
                                Repository moduleRepository)
                         throws IOException
Create a new analyser.

Parameters:
moduleDef - module whose dependency needs to be analysed
moduleRepository - repository used to satisfy dependencies
Throws:
IOException
Method Detail

analyse

public boolean analyse()
                throws IOException
Analyse dependency of a module. It uses the repository to look up modules that this module depends on.

Returns:
true if all the dependencies are OK, false if something is missing
Throws:
IOException - if there is any failure in reading module information

excludePatterns

public void excludePatterns(Collection<String> patterns)

excludePackages

public void excludePackages(Collection<String> packages)

excludeClasses

public void excludeClasses(Collection<String> classes)

getResult

public Map<String,Collection<String>> getResult()
Returns:
a map of referencing class name to collection of unresolved classes
See Also:
for description of the return value.

getResultAsString

public String getResultAsString()

printResult

public void printResult(PrintStream out)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2013 Oracle Corporation. All Rights Reserved.