net.sourceforge.pmd
Class SourceTypeDiscoverer

java.lang.Object
  extended by net.sourceforge.pmd.SourceTypeDiscoverer

public class SourceTypeDiscoverer
extends java.lang.Object

This class can give the SourceType of a source file.

Author:
pieter_van_raemdonck - Application Engineers NV/SA - www.ae.be

Constructor Summary
SourceTypeDiscoverer()
          Public constructor.
 
Method Summary
 SourceType getSourceTypeOfFile(java.io.File sourceFile)
          Get the SourceType of a given source file.
 SourceType getSourceTypeOfFile(java.lang.String fileName)
          Get the SourceType of a source file with given name.
 SourceType getSourceTypeOfJavaFiles()
           
 void setSourceTypeOfJavaFiles(SourceType sourceType)
          Set the SourceType of files with ".java" extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceTypeDiscoverer

public SourceTypeDiscoverer()
Public constructor.

Method Detail

getSourceTypeOfFile

public SourceType getSourceTypeOfFile(java.io.File sourceFile)
Get the SourceType of a given source file.

Parameters:
sourceFile - The File
Returns:
a SourceType

getSourceTypeOfFile

public SourceType getSourceTypeOfFile(java.lang.String fileName)
Get the SourceType of a source file with given name.

Parameters:
fileName - The File
Returns:
a SourceType ; null if the fileName is not recognized as a supported source type.

setSourceTypeOfJavaFiles

public void setSourceTypeOfJavaFiles(SourceType sourceType)
Set the SourceType of files with ".java" extension. This chooses the Java version.

Parameters:
sourceType - the wanted SourceType

getSourceTypeOfJavaFiles

public SourceType getSourceTypeOfJavaFiles()


Copyright © 2002-2011 InfoEther. All Rights Reserved.