org.codehaus.enunciate.main
Class PackageInfoClasspathHandler

java.lang.Object
  extended by org.codehaus.enunciate.main.PackageInfoClasspathHandler
All Implemented Interfaces:
ClasspathHandler

public class PackageInfoClasspathHandler
extends java.lang.Object
implements ClasspathHandler

Author:
Ryan Heaton

Constructor Summary
PackageInfoClasspathHandler(Enunciate enunciate)
           
 
Method Summary
 boolean endPathEntry(java.io.File pathEntry)
          End an entry on the classpath.
 java.util.Set<java.io.File> getPackageInfoSources()
           
 void handleResource(ClasspathResource resource)
          Handle a classpath resource.
 void startPathEntry(java.io.File pathEntry)
          Start an entry on the classpath.
protected  boolean writePackageSourceFile(java.io.InputStream bytecode, java.io.File packageSourceFile)
          Write the package-info.java source to the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageInfoClasspathHandler

public PackageInfoClasspathHandler(Enunciate enunciate)
                            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

startPathEntry

public void startPathEntry(java.io.File pathEntry)
Description copied from interface: ClasspathHandler
Start an entry on the classpath.

Specified by:
startPathEntry in interface ClasspathHandler
Parameters:
pathEntry - The path entry.

handleResource

public void handleResource(ClasspathResource resource)
Description copied from interface: ClasspathHandler
Handle a classpath resource.

Specified by:
handleResource in interface ClasspathHandler
Parameters:
resource - The classpath resource to handle.

endPathEntry

public boolean endPathEntry(java.io.File pathEntry)
Description copied from interface: ClasspathHandler
End an entry on the classpath.

Specified by:
endPathEntry in interface ClasspathHandler
Parameters:
pathEntry - The entry on the classpath that we're ending.
Returns:
Whether to attempt to look up the sources for the specified path entry.

writePackageSourceFile

protected boolean writePackageSourceFile(java.io.InputStream bytecode,
                                         java.io.File packageSourceFile)
                                  throws java.io.IOException
Write the package-info.java source to the specified file.

Parameters:
bytecode - The bytecode for the package-info.class
packageSourceFile - The source file.
Returns:
Whether the file was actually written.
Throws:
java.io.IOException

getPackageInfoSources

public java.util.Set<java.io.File> getPackageInfoSources()