xdoclet.loader
Class ModuleFinder

java.lang.Object
  extended by xdoclet.loader.ModuleFinder

public class ModuleFinder
extends java.lang.Object

Finds xdoclet modules.

Version:
$Revision: 1.15 $
Author:
Aslak Helles?y
created
7. april 2002
To do:
Use reflection to call AntClassLoader.getClasspath to remove dependency to Ant. This package should be Ant independent

Constructor Summary
ModuleFinder()
           
 
Method Summary
static java.util.List findModules()
          Returns a List of XDocletModule objects
static java.lang.String getClasspath()
           
static java.io.File getNewestFileOnClassPath()
          Get the newest Jar file on the classpath.
static void initClasspath(java.lang.Class clazz)
          Initialises the classpath.
static void resetFoundModules()
           
static void setClasspath(java.lang.String classpath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleFinder

public ModuleFinder()
Method Detail

getClasspath

public static java.lang.String getClasspath()

getNewestFileOnClassPath

public static java.io.File getNewestFileOnClassPath()
Get the newest Jar file on the classpath. This method is used to see if a generation is needed because one of the xdoclet jars might have changed since the last generation.

Returns:
The timestamp of the newest jar file on the classpath

setClasspath

public static void setClasspath(java.lang.String classpath)

initClasspath

public static void initClasspath(java.lang.Class clazz)
Initialises the classpath. If a system property named xdoclet.class.path, then that value will be used. If not, we'll try to cast the clazz' class loader to an AntClassLoader and get classpath from there. If that fails (happens if the clazz was loaded by the system class loader), we'll use java.class.path.

Parameters:
clazz - the class used to find classpath.

findModules

public static java.util.List findModules()
Returns a List of XDocletModule objects

Returns:

resetFoundModules

public static void resetFoundModules()

http://xdoclet.sourceforge.net/