experimental
Class GenerateDependenciesXmlAndHtml

java.lang.Object
  extended by experimental.GenerateDependenciesXmlAndHtml

public class GenerateDependenciesXmlAndHtml
extends java.lang.Object

This class generates an ant script that checks the dependencies between packages and also generates an html page that illustrates the allowed dependencies. The checkdep target on the generated ant script tests the dependencies of packages. It does this by copying the contents of the package in question together with the contents of the packages it is allowed to depend on to a temporary directory, then compiling the contents of the package. If the packaged depends on classes other than those contained in the packages it is allowed to depend on, the compile will fail.

Author:
Luke

Field Summary
private  java.io.PrintWriter htmlWriter
           
private static java.util.logging.Logger logger
           
private  java.util.ArrayList<java.lang.String> packages
           
private  java.lang.String sig
           
private  boolean started
           
private  boolean startedBlock
           
private  java.io.PrintWriter xmlWriter
           
 
Constructor Summary
private GenerateDependenciesXmlAndHtml(java.lang.String xmlFilename, java.lang.String htmlFilename)
           
 
Method Summary
private  void add(java.lang.String packageName)
           
private  void add(java.lang.String[] packageNames)
           
private  java.lang.String convertToPackageName(java.lang.String packagesString)
           
private  void endBlock()
           
private  void finish()
           
(package private) static boolean isPackageNameOk(java.lang.String s)
           
static void main(java.lang.String[] args)
           
private  void start()
           
private  void startBlock(java.lang.String blockName)
           
private  void startXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final java.util.logging.Logger logger

xmlWriter

private java.io.PrintWriter xmlWriter

htmlWriter

private java.io.PrintWriter htmlWriter

packages

private java.util.ArrayList<java.lang.String> packages

started

private boolean started

startedBlock

private boolean startedBlock

sig

private java.lang.String sig
Constructor Detail

GenerateDependenciesXmlAndHtml

private GenerateDependenciesXmlAndHtml(java.lang.String xmlFilename,
                                       java.lang.String htmlFilename)
                                throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

main

public static void main(java.lang.String[] args)

start

private void start()

startBlock

private void startBlock(java.lang.String blockName)

endBlock

private void endBlock()

startXml

private void startXml()

add

private void add(java.lang.String packageName)

add

private void add(java.lang.String[] packageNames)

convertToPackageName

private java.lang.String convertToPackageName(java.lang.String packagesString)

isPackageNameOk

static boolean isPackageNameOk(java.lang.String s)

finish

private void finish()