hudson.plugins.tasks.parser
Class CsharpNamespaceDetector

java.lang.Object
  extended by hudson.plugins.tasks.parser.CsharpNamespaceDetector
All Implemented Interfaces:
PackageDetector

public class CsharpNamespaceDetector
extends java.lang.Object
implements PackageDetector

Detects the namespace of a C# workspace file.

Author:
Ulli Hafner

Constructor Summary
CsharpNamespaceDetector()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsharpNamespaceDetector

public CsharpNamespaceDetector()
Method Detail

accepts

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

Specified by:
accepts in interface PackageDetector
Parameters:
fileName - the file name
Returns:
true if the classifier accepts the specified file for processing.

detectPackageName

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

Specified by:
detectPackageName in interface PackageDetector
Parameters:
stream - the content of the file to scan
Returns:
the detected package or namespace name
Throws:
java.io.IOException - if the file could not be read


Copyright © 2008. All Rights Reserved.