|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acm.seguin.pmd.PMDDirectory
public class PMDDirectory
Defines and provides access to PMD's directory structure. The user defines the location of the root PMD directory, e.g., /users/userA/PMD. The PMD directory structure provides the following:
The directory structure and contents are the following:
PMD
pmd.properties
rulesets
basic.xml
design.xml
import.xml
com
myCompany
pmd
rules
myRule01.class
myRule02.class
myRule03.class
net
sourceforge
pmd
rules
myNewExperimentalRule.class
The PMD directory is the root directory of all PMD files.
The pmd.properties file contains various information to be defined.
The rulesets directory contains the rule set files and rule class file directories.
A rule set file is a XML file that describes the rule set and its rules. This information is displayed and maintained in the PMD Viewer. The rule class files are called by PMD to perform the analysis.
All rule classes, other than the rule classes in pmd.jar, are stored in directory paths defined by each rule's class name. The Java classpath is appended with the rulesets directory so that the rule class and any supporting class files may be found.
NOTE: The user's home directory will contain a PMD directory with a user.preferences file. An entry in the user's preferences will be the path to the PMD root directory described above.
Method Summary | |
---|---|
static PMDDirectory |
getDirectory()
|
RuleSet |
getIncludedRules(int lowestPriorityForAnalysis)
Gets a rule set containing only the rule sets and rules to be included for running the analysis. |
java.lang.String |
getPMDDirectoryPath()
|
java.util.List |
getRegisteredRuleSets()
|
RuleSet |
getRuleSet(java.io.File ruleSetFile)
Gets the rule set for the given rule set file. |
RuleSet |
getRuleSet(java.io.File ruleSetFile,
boolean onlyIfIncluded)
Gets the rule set for the given rule set File. |
java.util.List |
getRuleSets()
|
java.lang.String |
getRuleSetsDirectoryPath()
|
static void |
open(java.lang.String pathToPMD)
|
void |
savePropertiesFile()
|
protected void |
saveRuleSets(java.util.List ruleSetList)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final void open(java.lang.String pathToPMD) throws PMDException
pathToPMD
- The full path to the PMD directory, but excludes the PMD directory.
PMDException
public static final PMDDirectory getDirectory()
public RuleSet getIncludedRules(int lowestPriorityForAnalysis) throws PMDException
PMDException
public RuleSet getRuleSet(java.io.File ruleSetFile) throws PMDException
ruleSetFile
- The file of the desired rule set.
PMDException
public RuleSet getRuleSet(java.io.File ruleSetFile, boolean onlyIfIncluded) throws PMDException
ruleSetFile
- The file of the desired rule set.
PMDException
public java.util.List getRegisteredRuleSets()
public java.util.List getRuleSets() throws PMDException
PMDException
public java.lang.String getPMDDirectoryPath()
public java.lang.String getRuleSetsDirectoryPath()
protected void saveRuleSets(java.util.List ruleSetList)
ruleSetList
- public void savePropertiesFile() throws PMDException
PMDException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |