Test data for UseSingletonRule

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@126 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
David Dixon-Peugh
2002-06-28 17:30:01 +00:00
parent b89d46f4c6
commit 2f663a2e24
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,13 @@
public class UseSingleton1
{
// Should trigger UseSingleton rule?
public UseSingleton1() { }
public static void doSomething() {
// Blah, blah, blah.
}
public static void main(String args[]) {
doSomething();
}
}

View File

@ -0,0 +1,9 @@
public class UseSingleton2
{
// Should not trigger UseSingleton rule.
public UseSingleton2() { }
public void doSomething() { }
public static void main(String args[]) { }
}

View File

@ -0,0 +1,7 @@
public class UseSingleton3
{
// Should trigger it.
public static void doSomething1() { }
public static void doSomething2() { }
public static void doSomething3() { }
}