A B C D E F G H I M N O P R S T V 
All Classes All Packages

A

AbstractAntTestHelper - Class in net.sourceforge.pmd.ant
Quite an ugly classe, arguably useful for just 2 units test - nevertheless as there is a workaround that must be shared by both tests (PMD and CPD's) I felt compelled to move it to a single classes.
AbstractAntTestHelper() - Constructor for class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
AbstractLanguageVersionTest - Class in net.sourceforge.pmd
Base test class for LanguageVersion implementations.
AbstractLanguageVersionTest(String, String, String, LanguageVersion) - Constructor for class net.sourceforge.pmd.AbstractLanguageVersionTest
AbstractRuleSetFactoryTest - Class in net.sourceforge.pmd
Base test class to verify the language's rulesets.
AbstractRuleSetFactoryTest() - Constructor for class net.sourceforge.pmd.AbstractRuleSetFactoryTest
 
AbstractRuleSetFactoryTest(String...) - Constructor for class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Constructor used when a module that depends on another module wants to filter out the dependee's rulesets.
AbstractTokenizerTest - Class in net.sourceforge.pmd.testframework
Deprecated.
Use CpdTextComparisonTest in module pmd-lang-test
AbstractTokenizerTest() - Constructor for class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
addRule(String, String) - Method in class net.sourceforge.pmd.testframework.SimpleAggregatorTst
Add new XML tests associated with the rule to the test suite.
antTestScriptFilename - Variable in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
assertContains(String, String) - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
assertDoesntContain(String, String) - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
assertOutputContaining(String) - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 

B

BaseCLITest - Class in net.sourceforge.pmd.cli
 
BaseCLITest() - Constructor for class net.sourceforge.pmd.cli.BaseCLITest
 
BaseCPDCLITest - Class in net.sourceforge.pmd.cli
 
BaseCPDCLITest() - Constructor for class net.sourceforge.pmd.cli.BaseCPDCLITest
 
buildRule - Variable in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
buildTokenizer() - Method in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 

C

checkStatusCode(int) - Method in class net.sourceforge.pmd.cli.BaseCLITest
Deprecated.
Use BaseCLITest.runTest(StatusCode, String...) instead of checking the return code manually
containsPattern(String) - Static method in class net.sourceforge.pmd.cli.BaseCLITest
 
createRuleSetReferenceId(String) - Static method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Create a RuleSetReferenceId by the given XML string.
createRuleViolation(Rule, RuleContext, Node, String) - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.RuleViolationFactory
 
createRuleViolation(Rule, RuleContext, Node, String, int, int) - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.RuleViolationFactory
 
createTestOutputFile(String) - Method in class net.sourceforge.pmd.cli.BaseCLITest
 
currentTempFile() - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
Returns the current temporary file.

D

describeChild(TestDescriptor) - Method in class net.sourceforge.pmd.testframework.RuleTestRunner
 
DummyLanguageModule - Class in net.sourceforge.pmd.test.lang
Dummy language used for testing PMD.
DummyLanguageModule() - Constructor for class net.sourceforge.pmd.test.lang.DummyLanguageModule
 
DummyLanguageModule.DummyRuleChainVisitor - Class in net.sourceforge.pmd.test.lang
Deprecated.
for removal with PMD 7. A language dependent rule chain visitor is not needed anymore. See RuleChainVisitor.
DummyLanguageModule.Handler - Class in net.sourceforge.pmd.test.lang
 
DummyLanguageModule.RuleViolationFactory - Class in net.sourceforge.pmd.test.lang
 
DummyNode - Class in net.sourceforge.pmd.test.lang.ast
 
DummyNode(int) - Constructor for class net.sourceforge.pmd.test.lang.ast.DummyNode
 
DummyRuleChainVisitor() - Constructor for class net.sourceforge.pmd.test.lang.DummyLanguageModule.DummyRuleChainVisitor
Deprecated.
 

E

executeTarget(String) - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
expectedTokenCount - Variable in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
extractTestsFromXml(Rule) - Method in class net.sourceforge.pmd.testframework.RuleTst
Extract a set of tests from an XML file.
extractTestsFromXml(Rule, String) - Method in class net.sourceforge.pmd.testframework.RuleTst
 
extractTestsFromXml(Rule, String, String) - Method in class net.sourceforge.pmd.testframework.RuleTst
Extract a set of tests from an XML file with the given name.

F

filter(Filter) - Method in class net.sourceforge.pmd.testframework.PMDTestRunner
 
findRule(String, String) - Method in class net.sourceforge.pmd.testframework.RuleTst
Find a rule in a certain ruleset by name

G

getChildren() - Method in class net.sourceforge.pmd.testframework.RuleTestRunner
 
getCleanRuleName(Rule) - Method in class net.sourceforge.pmd.testframework.RuleTst
getResourceAsStream tries to find the XML file in weird locations if the ruleName includes the package, so we strip it here.
getCode() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getDescription() - Method in class net.sourceforge.pmd.testframework.PMDTestRunner
 
getDescription() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getExpectedLineNumbers() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getExpectedMessages() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getLanguageVersion() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getNumberInDocument() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getNumberOfProblemsExpected() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getOutput() - Method in class net.sourceforge.pmd.cli.BaseCPDCLITest
 
getParser(ParserOptions) - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.Handler
 
getProperties() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getReinitializeRule() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getRule() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
getRules() - Method in class net.sourceforge.pmd.testframework.PmdRuleTst
 
getRules() - Method in class net.sourceforge.pmd.testframework.RuleTst
 
getRules() - Method in class net.sourceforge.pmd.testframework.SimpleAggregatorTst
Gets all configured rules.
getRuleViolationFactory() - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.Handler
 
getSampleCode() - Method in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
getStatusCode() - Method in class net.sourceforge.pmd.cli.BaseCLITest
Deprecated.
Use BaseCLITest.runTest(StatusCode, String...) instead of checking the return code manually
getXPathNodeName() - Method in class net.sourceforge.pmd.test.lang.ast.DummyNode
 

H

Handler() - Constructor for class net.sourceforge.pmd.test.lang.DummyLanguageModule.Handler
 
hasUnitTests() - Method in class net.sourceforge.pmd.testframework.RuleTestRunner
Checks whether this test class has additionally unit test methods.

I

indexNodes(List<Node>, RuleContext) - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.DummyRuleChainVisitor
Deprecated.
 
init() - Static method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Setups the XML parser with validation.
inRegressionTestMode() - Static method in class net.sourceforge.pmd.testframework.TestDescriptor
Checks whether we are testing for regression problems only.
isIgnored(TestDescriptor) - Method in class net.sourceforge.pmd.testframework.RuleTestRunner
 
isRegressionTest() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
isUseAuxClasspath() - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 

M

mvnWorkaround - Variable in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 

N

NAME - Static variable in class net.sourceforge.pmd.test.lang.DummyLanguageModule
 
net.sourceforge.pmd - package net.sourceforge.pmd
 
net.sourceforge.pmd.ant - package net.sourceforge.pmd.ant
 
net.sourceforge.pmd.cli - package net.sourceforge.pmd.cli
 
net.sourceforge.pmd.lang - package net.sourceforge.pmd.lang
 
net.sourceforge.pmd.test.lang - package net.sourceforge.pmd.test.lang
 
net.sourceforge.pmd.test.lang.ast - package net.sourceforge.pmd.test.lang.ast
 
net.sourceforge.pmd.testframework - package net.sourceforge.pmd.testframework
 

O

originalErr - Variable in class net.sourceforge.pmd.cli.BaseCLITest
 
originalOut - Variable in class net.sourceforge.pmd.cli.BaseCLITest
 

P

ParserOptionsTest - Class in net.sourceforge.pmd.lang
Deprecated.
for removal in PMD 7.0. Use ParserOptionsTestUtils.
ParserOptionsTest() - Constructor for class net.sourceforge.pmd.lang.ParserOptionsTest
Deprecated.
 
ParserOptionsTestUtils - Class in net.sourceforge.pmd.lang
 
pathToTestScript - Variable in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
PmdRuleTst - Class in net.sourceforge.pmd.testframework
 
PmdRuleTst() - Constructor for class net.sourceforge.pmd.testframework.PmdRuleTst
 
PMDTestRunner - Class in net.sourceforge.pmd.testframework
A JUnit Runner, that combines the default JUnit4 and our custom RuleTestRunner.
PMDTestRunner(Class<? extends SimpleAggregatorTst>) - Constructor for class net.sourceforge.pmd.testframework.PMDTestRunner
 

R

reinitializeRule(Rule) - Method in class net.sourceforge.pmd.testframework.RuleTst
Code to be executed if the rule is reinitialised.
RuleTestRunner - Class in net.sourceforge.pmd.testframework
A JUnit Runner, that executes all declared rule tests in the class.
RuleTestRunner(Class<? extends RuleTst>) - Constructor for class net.sourceforge.pmd.testframework.RuleTestRunner
 
RuleTst - Class in net.sourceforge.pmd.testframework
Advanced methods for test cases
RuleTst() - Constructor for class net.sourceforge.pmd.testframework.RuleTst
 
RuleViolationFactory() - Constructor for class net.sourceforge.pmd.test.lang.DummyLanguageModule.RuleViolationFactory
 
run(RunNotifier) - Method in class net.sourceforge.pmd.testframework.PMDTestRunner
 
runChild(TestDescriptor, RunNotifier) - Method in class net.sourceforge.pmd.testframework.RuleTestRunner
 
runCPD(String...) - Method in class net.sourceforge.pmd.cli.BaseCPDCLITest
 
runPMDWith(String[]) - Method in class net.sourceforge.pmd.cli.BaseCLITest
runTest(int, String...) - Method in class net.sourceforge.pmd.cli.BaseCLITest
runTest(String...) - Method in class net.sourceforge.pmd.cli.BaseCLITest
Returns the log output.
runTest(String[], String) - Method in class net.sourceforge.pmd.cli.BaseCLITest
Deprecated.
Use BaseCLITest.runTest(String...), note that it returns the log while this returns the name of a file containing the log.
runTest(String[], String, int) - Method in class net.sourceforge.pmd.cli.BaseCLITest
Deprecated.
Use BaseCLITest.runTest(StatusCode, String...), note that it returns the log while this returns the name of a file containing the log.
runTest(PMD.StatusCode, String...) - Method in class net.sourceforge.pmd.cli.BaseCLITest
 
runTest(TestDescriptor) - Method in class net.sourceforge.pmd.testframework.RuleTst
Run the rule on the given code, and check the expected number of violations.
runTestFromString(String, Rule, Report, LanguageVersion) - Method in class net.sourceforge.pmd.testframework.RuleTst
Run the rule on the given code and put the violations in the report.
runTestFromString(String, Rule, Report, LanguageVersion, boolean) - Method in class net.sourceforge.pmd.testframework.RuleTst
 
runTestFromString(TestDescriptor, Rule, Report) - Method in class net.sourceforge.pmd.testframework.RuleTst
 
runTests(Rule) - Method in class net.sourceforge.pmd.testframework.RuleTst
Run a set of tests defined in an XML test-data file for a rule.
runTests(Rule, String) - Method in class net.sourceforge.pmd.testframework.RuleTst
Run a set of tests defined in a XML test-data file.
runTests(TestDescriptor[]) - Method in class net.sourceforge.pmd.testframework.RuleTst
Run a set of tests of a certain sourceType.

S

setExpectedLineNumbers(List<Integer>) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setExpectedMessages(List<String>) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setNumberInDocument(int) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setProperties(Properties) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setRegressionTest(boolean) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setReinitializeRule(boolean) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
setup() - Method in class net.sourceforge.pmd.cli.BaseCLITest
 
setup() - Method in class net.sourceforge.pmd.cli.BaseCPDCLITest
 
setUp() - Method in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
setUp() - Static method in class net.sourceforge.pmd.cli.BaseCLITest
 
setUp() - Method in class net.sourceforge.pmd.testframework.PmdRuleTst
 
setUp() - Method in class net.sourceforge.pmd.testframework.RuleTst
 
setUp() - Method in class net.sourceforge.pmd.testframework.SimpleAggregatorTst
Configure the rule tests to be executed.
setUseAuxClasspath(boolean) - Method in class net.sourceforge.pmd.testframework.TestDescriptor
 
SimpleAggregatorTst - Class in net.sourceforge.pmd.testframework
Simple setup for a rule unit test, capable of testing multiple rules.
SimpleAggregatorTst() - Constructor for class net.sourceforge.pmd.testframework.SimpleAggregatorTst
 
sort(Sorter) - Method in class net.sourceforge.pmd.testframework.PMDTestRunner
 
SOURCE_FOLDER - Static variable in class net.sourceforge.pmd.cli.BaseCLITest
 
sourceCode - Variable in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
systemErrRule - Variable in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
 

T

teardown() - Method in class net.sourceforge.pmd.cli.BaseCPDCLITest
 
tearDown() - Method in class net.sourceforge.pmd.cli.BaseCLITest
 
tempFolder - Variable in class net.sourceforge.pmd.ant.AbstractAntTestHelper
 
TERSE_NAME - Static variable in class net.sourceforge.pmd.test.lang.DummyLanguageModule
 
TEST_OUPUT_DIRECTORY - Static variable in class net.sourceforge.pmd.cli.BaseCLITest
 
testAllPMDBuiltInRulesMeetConventions() - Method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Checks all rulesets of all languages on the classpath and verifies that all required attributes for all rules are specified.
TestDescriptor - Class in net.sourceforge.pmd.testframework
Stores the information required to run a complete test.
TestDescriptor() - Constructor for class net.sourceforge.pmd.testframework.TestDescriptor
 
TestDescriptor(String, String, int, Rule) - Constructor for class net.sourceforge.pmd.testframework.TestDescriptor
 
TestDescriptor(String, String, int, Rule, LanguageVersion) - Constructor for class net.sourceforge.pmd.testframework.TestDescriptor
 
testDtd() - Method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Verifies that all rulesets are valid XML according to the DTD.
testEqualsHashcode() - Method in class net.sourceforge.pmd.lang.ParserOptionsTest
Deprecated.
Verify that the equals and hashCode methods work as expected.
testFindVersionsForLanguageNameAndVersion() - Method in class net.sourceforge.pmd.AbstractLanguageVersionTest
testGetLanguageVersionForTerseName() - Method in class net.sourceforge.pmd.AbstractLanguageVersionTest
Checks that the expected LanguageVersion can be found by the combination of AbstractLanguageVersionTest.terseName and AbstractLanguageVersionTest.version.
testOldRegisteredRulesets() - Method in class net.sourceforge.pmd.AbstractLanguageVersionTest
If a rulesets.properties file still exists, test it as well.
testReadWriteRoundTrip() - Method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Reads and writes the rulesets to make sure, that no data is lost if the rulests are processed.
testRegisteredRulesets() - Method in class net.sourceforge.pmd.AbstractLanguageVersionTest
Makes sure, that for each language a "categories.properties" file exists.
testSuppressMarker() - Method in class net.sourceforge.pmd.lang.ParserOptionsTest
Deprecated.
SuppressMarker should be initially null and changeable.
testVersionsAreDistinct() - Method in class net.sourceforge.pmd.AbstractLanguageVersionTest
 
testXmlSchema() - Method in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
Verifies that all rulesets are valid XML according to the xsd schema.
tokenizer - Variable in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
tokenizeTest() - Method in class net.sourceforge.pmd.testframework.AbstractTokenizerTest
Deprecated.
 
toString() - Method in class net.sourceforge.pmd.test.lang.ast.DummyNode
Deprecated.

V

validXPathClassNames - Variable in class net.sourceforge.pmd.AbstractRuleSetFactoryTest
 
verifyOptionsEqualsHashcode(ParserOptions, ParserOptions, ParserOptions, ParserOptions) - Static method in class net.sourceforge.pmd.lang.ParserOptionsTest
Deprecated.
Verify equals and hashCode for 4 ParserOptions instances.
verifyOptionsEqualsHashcode(ParserOptions, ParserOptions, ParserOptions, ParserOptions) - Static method in class net.sourceforge.pmd.lang.ParserOptionsTestUtils
Verify equals and hashCode for 4 ParserOptions instances.
visit(Rule, Node, RuleContext) - Method in class net.sourceforge.pmd.test.lang.DummyLanguageModule.DummyRuleChainVisitor
Deprecated.
 
A B C D E F G H I M N O P R S T V 
All Classes All Packages