org.codehaus.plexus.mainclass
Class AbstractMainClassFinder

java.lang.Object
  extended by org.codehaus.plexus.mainclass.AbstractMainClassFinder
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, MainClassFinder
Direct Known Subclasses:
AsmMainClassFinder

public abstract class AbstractMainClassFinder
extends java.lang.Object
implements MainClassFinder, org.codehaus.plexus.logging.LogEnabled

Abstract implementation of MainClassFinder handling all the directory and Jar scanning. Actual implementations are called with the containsMainClass(java.io.InputStream) method.


Field Summary
 
Fields inherited from interface org.codehaus.plexus.mainclass.MainClassFinder
ROLE
 
Constructor Summary
AbstractMainClassFinder()
           
 
Method Summary
protected abstract  boolean containsMainClass(java.io.InputStream inputStream)
          Implemented by subclasses.
 void enableLogging(org.codehaus.plexus.logging.Logger logger)
           
 java.util.List findMainClasses(java.util.List classPath)
          Find names of all classes containing a main method.
 org.codehaus.plexus.logging.Logger getLogger()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMainClassFinder

public AbstractMainClassFinder()
Method Detail

findMainClasses

public java.util.List findMainClasses(java.util.List classPath)
Description copied from interface: MainClassFinder
Find names of all classes containing a main method.

Specified by:
findMainClasses in interface MainClassFinder
Parameters:
classPath - a List of jar files or directories where class files can be found
Returns:
a List of (MainClass)es.

containsMainClass

protected abstract boolean containsMainClass(java.io.InputStream inputStream)
Implemented by subclasses.

Parameters:
inputStream -
Returns:

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger logger)
Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled

getLogger

public org.codehaus.plexus.logging.Logger getLogger()


Copyright © 2001-2009 Codehaus. All Rights Reserved.