xdoclet.loader

Class ModuleFinder

public class ModuleFinder extends Object

Finds xdoclet modules.

Version: $Revision: 1.15 $

Author: Aslak Hellesxy

UNKNOWN: 7. april 2002 Use reflection to call AntClassLoader.getClasspath to remove dependency to Ant. This package should be Ant independent

Method Summary
static ListfindModules()
Returns a List of XDocletModule objects
static StringgetClasspath()
static FilegetNewestFileOnClassPath()
Get the newest Jar file on the classpath.
static voidinitClasspath(Class clazz)
Initialises the classpath.
static voidresetFoundModules()
static voidsetClasspath(String classpath)

Method Detail

findModules

public static List findModules()
Returns a List of XDocletModule objects

Returns:

getClasspath

public static String getClasspath()

getNewestFileOnClassPath

public static 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

initClasspath

public static void initClasspath(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.

resetFoundModules

public static void resetFoundModules()

setClasspath

public static void setClasspath(String classpath)