com.ail.core.configure.finder
Class GetClassListService

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.Service
          extended by com.ail.core.configure.finder.GetClassListService
All Implemented Interfaces:
ConfigurationOwner, CoreUser, java.io.Serializable, java.lang.Cloneable

public class GetClassListService
extends Service

This service finds the classes that implement or extend a given base class. The SearchClass argument specifies the name of the class to search for implementors of, and the service searches its own classpath (i.e. the classpath of the instance of the service) for implementors which are returned as a collection of class names.

By default the search covers only the com.ail package tree. However, the SearchPackage argument may be used to specify an alternate package tree to search.

An empty list is returned if the class being searched for does not exist.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
GetClassListService()
          Default constructor
 
Method Summary
 CommandArg getArgs()
          Getter returning the arguments used by this entry point.
 Core getCore()
          Getter to fetch the entry point's code.
 Version getVersion()
          Fetch the version of this entry point.
 void invoke()
          TODO This really needs a good refactoring - it build up vectors of files, vectors of directories, and vectors of classes.
 void setArgs(CommandArg args)
          Setter used to the set the entry points arguments.
 
Methods inherited from class com.ail.core.Service
getConfiguration, getConfigurationNamespace, getSecurityPrincipal, getVersionEffectiveDate, resetConfiguration, setConfiguration
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetClassListService

public GetClassListService()
Default constructor

Method Detail

getCore

public Core getCore()
Getter to fetch the entry point's code. This method is demanded by the EntryPoint class.

Specified by:
getCore in class Service
Returns:
This entry point's instance of Core.

getVersion

public Version getVersion()
Fetch the version of this entry point.

Specified by:
getVersion in class Service
Returns:
A version object describing the version of this entry point.

setArgs

public void setArgs(CommandArg args)
Setter used to the set the entry points arguments.

Specified by:
setArgs in class Service
Parameters:
args - for invoke

getArgs

public CommandArg getArgs()
Getter returning the arguments used by this entry point.

Specified by:
getArgs in class Service
Returns:
An instance of $Name: $Args.

invoke

public void invoke()
            throws PreconditionException
TODO This really needs a good refactoring - it build up vectors of files, vectors of directories, and vectors of classes. There's no need for any of them, the processing can be done on the fly without any lists - which would reduce the memory req. a lot.

Specified by:
invoke in class Service
Throws:
PreconditionException