hudson.plugins.tasks.util
Interface PackageDetector

All Known Implementing Classes:
AbstractPackageDetector, CsharpNamespaceDetector, JavaPackageDetector

public interface PackageDetector

Detects the package or namespace name of a file.

Author:
Ulli Hafner

Method Summary
 boolean accepts(java.lang.String fileName)
          Returns whether this classifier accepts the specified file for processing.
 java.lang.String detectPackageName(java.io.InputStream stream)
          Detects the package or namespace name of the specified input stream.
 java.lang.String detectPackageName(java.lang.String fileName)
          Detects the package or namespace name of the specified input stream.
 

Method Detail

detectPackageName

java.lang.String detectPackageName(java.io.InputStream stream)
Detects the package or namespace name of the specified input stream. The stream must be closed afterwards.

Parameters:
stream - the content of the file to scan
Returns:
the detected package or namespace name

detectPackageName

java.lang.String detectPackageName(java.lang.String fileName)
Detects the package or namespace name of the specified input stream. The stream must be closed afterwards.

Parameters:
fileName - the file name of the file to scan
Returns:
the detected package or namespace name

accepts

boolean accepts(java.lang.String fileName)
Returns whether this classifier accepts the specified file for processing.

Parameters:
fileName - the file name
Returns:
true if the classifier accepts the specified file for processing.


Copyright © 2009. All Rights Reserved.