## Uses of Class
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule

Packages that use AbstractJavaRule
Package | Description
--- | ---
net.sourceforge.pmd.lang.java.rule |
net.sourceforge.pmd.lang.java.rule.basic |
net.sourceforge.pmd.lang.java.rule.codesize |
net.sourceforge.pmd.lang.java.rule.comments |
net.sourceforge.pmd.lang.java.rule.controversial |
net.sourceforge.pmd.lang.java.rule.coupling |
net.sourceforge.pmd.lang.java.rule.design |
net.sourceforge.pmd.lang.java.rule.finalizers |
net.sourceforge.pmd.lang.java.rule.imports |
net.sourceforge.pmd.lang.java.rule.javabeans |
net.sourceforge.pmd.lang.java.rule.junit |
net.sourceforge.pmd.lang.java.rule.logging |
net.sourceforge.pmd.lang.java.rule.migrating |
net.sourceforge.pmd.lang.java.rule.naming |
net.sourceforge.pmd.lang.java.rule.optimizations |
net.sourceforge.pmd.lang.java.rule.strictexception |
net.sourceforge.pmd.lang.java.rule.strings |
net.sourceforge.pmd.lang.java.rule.sunsecure |
net.sourceforge.pmd.lang.java.rule.unnecessary |
net.sourceforge.pmd.lang.java.rule.unusedcode |
net.sourceforge.pmd.lang.java.typeresolution.rules |
net.sourceforge.pmd.lang.java.typeresolution.rules.imports |
net.sourceforge.pmd.util.designer |

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractInefficientZeroCheck` This is an abstract rule for patterns which compare a method invocation to 0.
`class` | `AbstractPoorMethodCall` Detects and flags the occurrences of specific method calls against an instance of a designated class.
`class` | `AbstractStatisticalJavaRule`
`class` | `GenericLiteralCheckerRule` This class allow to match a Literal (most likely a String) with a regex pattern.
`class` | `StringConcatenationRule`
`class` | `SymbolTableTestRule`
`class` | `UselessAssignment`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.basic

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.basic
Modifier and Type | Class and Description
--- | ---
`class` | `AvoidBranchingStatementAsLastInLoopRule`
`class` | `AvoidMultipleUnaryOperatorsRule`
`class` | `AvoidUsingHardCodedIPRule`
`class` | `AvoidUsingOctalValuesRule`
`class` | `BigIntegerInstantiationRule`
`class` | `BooleanInstantiationRule` Avoid instantiating Boolean objects; you can reference Boolean.TRUE, Boolean.FALSE, or call Boolean.valueOf() instead.
`class` | `BrokenNullCheckRule`
`class` | `CheckResultSetRule` Rule that verifies, that the return values of next(), first(), last(), etc.
`class` | `CheckSkipResultRule`
`class` | `DoubleCheckedLockingRule` void method() { if(x == null) { synchronized(this){ if(x == null) { x = new | method(); } } } 1.
`class` | `OverrideBothEqualsAndHashcodeRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.codesize

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.codesize
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractNcssCountRule` Abstract superclass for NCSS counting methods.
`class` | `CyclomaticComplexityRule`
`class` | `ExcessiveClassLengthRule` This rule detects when a class exceeds a certain threshold.
`class` | `ExcessiveMethodLengthRule` This rule detects when a method exceeds a certain threshold.
`class` | `ExcessiveParameterListRule` This rule detects an abnormally long parameter list.
`class` | `ExcessivePublicCountRule`
`class` | `NcssConstructorCountRule` Non-commented source statement counter for constructors.
`class` | `NcssMethodCountRule` Non-commented source statement counter for methods.
`class` | `NcssTypeCountRule` Non-commented source statement counter for type declarations.
`class` | `NPathComplexityRule` NPath complexity is a measurement of the acyclic execution paths through a function.
`class` | `TooManyFieldsRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.comments

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.comments
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractCommentRule`
`class` | `CodeInCommentsRule`
`class` | `CommentContentRule` A rule that checks for illegal words in the comment text.
`class` | `CommentRequiredRule`
`class` | `CommentSizeRule` A rule to manage those who just can't shut up...
`class` | `HeaderCommentsRule` Restrictions regarding the legal placement and content of the file header.
`class` | `JavadocRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.controversial

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.controversial
Modifier and Type | Class and Description
--- | ---
`class` | `AssignmentInOperandRule`
`class` | `DataflowAnomalyAnalysisRule` Starts path search for each method and runs code if found.
`class` | `DontImportSunRule`
`class` | `NullAssignmentRule`
`class` | `OnlyOneReturnRule`
`class` | `SuspiciousOctalEscapeRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.coupling

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.coupling
Modifier and Type | Class and Description
--- | ---
`class` | `CouplingBetweenObjectsRule` CouplingBetweenObjects attempts to capture all unique Class attributes, local variables, and return types to determine how many objects a class is coupled to.
`class` | `ExcessiveImportsRule` ExcessiveImports attempts to count all unique imports a class contains.
`class` | `LawOfDemeterRule` This rule can detect possible violations of the Law of Demeter.
`class` | `LooseCouplingRule`
`class` | `LoosePackageCouplingRule` The loose package coupling Rule can be used to ensure coupling outside of a package hierarchy is minimized to all but an allowed set of classes from within the package hierarchy.

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.design

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.design
Modifier and Type | Class and Description
--- | ---
`class` | `AccessorClassGenerationRule` 1.
`class` | `AssignmentToNonFinalStaticRule`
`class` | `AvoidDeeplyNestedIfStmtsRule`
`class` | `AvoidReassigningParametersRule`
`class` | `CloseResourceRule` Makes sure you close your database connections.
`class` | `CompareObjectsWithEqualsRule`
`class` | `ConfusingTernaryRule` if (x !
`class` | `ConstructorCallsOverridableMethodRule` Searches through all methods and constructors called from constructors.
`class` | `ExcessiveLengthRule` This is a common super class for things which have excessive length.
`class` | `ExcessiveNodeCountRule` This is a common super class for things which shouldn't have excessive nodes underneath.
`class` | `GenericClassCounterRule` A generic rule that can be configured to "count" classes of certain type based on either their name (full name, prefix, suffixes anything can be matched with a regex), and/or their type.
`class` | `GodClassRule` The God Class Rule detects a the God Class design flaw using metrics.
`class` | `IdempotentOperationsRule`
`class` | `ImmutableFieldRule`
`class` | `NonThreadSafeSingletonRule`
`class` | `PositionalIteratorRule`
`class` | `PreserveStackTraceRule`
`class` | `SimplifyBooleanReturnsRule`
`class` | `SingularFieldRule`
`class` | `SwitchDensityRule`
`class` | `UnnecessaryLocalBeforeReturnRule`
`class` | `UnsynchronizedStaticDateFormatterRule` Using a DateFormatter (SimpleDateFormatter) which is static can cause unexpected results when used in a multi-threaded environment.
`class` | `UseCollectionIsEmptyRule` Detect structures like "foo.size() == 0" and suggest replacing them with foo.isEmpty().
`class` | `UseSingletonRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.finalizers

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.finalizers
Modifier and Type | Class and Description
--- | ---
`class` | `AvoidCallingFinalizeRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.imports

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.imports
Modifier and Type | Class and Description
--- | ---
`class` | `DontImportJavaLangRule`
`class` | `DuplicateImportsRule`
`class` | `ImportFromSamePackageRule`
`class` | `UnnecessaryFullyQualifiedNameRule`
`class` | `UnusedImportsRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.javabeans

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.javabeans
Modifier and Type | Class and Description
--- | ---
`class` | `BeanMembersShouldSerializeRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.junit

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.junit
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractJUnitRule`
`class` | `JUnitAssertionsShouldIncludeMessageRule`
`class` | `JUnitTestsShouldIncludeAssertRule`
`class` | `TestClassWithoutTestCasesRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.logging

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.logging
Modifier and Type | Class and Description
--- | ---
`class` | `MoreThanOneLoggerRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.migrating

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.migrating
Modifier and Type | Class and Description
--- | ---
`class` | `JUnitUseExpectedRule` This rule finds code like this: public void testFoo() { try { doSomething(); fail("should have thrown an exception"); } catch (Exception e) { } } In JUnit 4, use @Test(expected = Exception.class)
`class` | `UnnecessaryCastRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.naming

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.naming
Modifier and Type | Class and Description
--- | ---
`class` | `AvoidDollarSignsRule`
`class` | `AvoidFieldNameMatchingMethodNameRule`
`class` | `AvoidFieldNameMatchingTypeNameRule`
`class` | `ClassNamingConventionsRule`
`class` | `MethodNamingConventionsRule`
`class` | `MethodWithSameNameAsEnclosingClassRule`
`class` | `SuspiciousHashcodeMethodNameRule`
`class` | `VariableNamingConventionsRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.optimizations

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.optimizations
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractOptimizationRule` Base class with utility methods for optimization rules
`class` | `AvoidInstantiatingObjectsInLoopsRule`
`class` | `LocalVariableCouldBeFinalRule`
`class` | `MethodArgumentCouldBeFinalRule`
`class` | `PrematureDeclarationRule` Checks for variables in methods that are defined before they are really needed.
`class` | `RedundantFieldInitializerRule` Detects redundant field initializers, i.e. the field initializer expressions the JVM would assign by default.
`class` | `UnnecessaryWrapperObjectCreationRule`
`class` | `UseStringBufferForStringAppendsRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.strictexception

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.strictexception
Modifier and Type | Class and Description
--- | ---
`class` | `AvoidCatchingThrowableRule` Finds `catch` statements containing `throwable` as the type definition.
`class` | `ExceptionAsFlowControlRule` Catches the use of exception statements as a flow control device.
`class` | `SignatureDeclareThrowsExceptionRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.strings

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.strings
Modifier and Type | Class and Description
--- | ---
`class` | `AppendCharacterWithCharRule` This rule finds the following: StringBuffer.append("c"); // appends a single character It is preferable to use StringBuffer.append('c'); // appends a single character Implementation of PMD RFE 1373863
`class` | `AvoidDuplicateLiteralsRule`

`class`

`ConsecutiveLiteralAppendsRule`
This rule finds concurrent calls to StringBuffer/Builder.append where String literals are used It would be much better to make these calls using one call to .append

example:

StringBuilder buf = new StringBuilder(); buf.append("Hello"); buf.append(" ").append("World");

This would be more eloquently put as:

StringBuilder buf = new StringBuilder(); buf.append("Hello World");

The rule takes one parameter, threshold, which defines the lower limit of consecutive appends before a violation is created.

`class` | `InefficientEmptyStringCheckRule` This rule finds code which inefficiently determines empty strings.
`class` | `InefficientStringBufferingRule` How this rule works: find additive expressions: + check that the addition is between anything other than two literals if true and also the parent is StringBuffer constructor or append, report a violation.
`class` | `InsufficientStringBufferDeclarationRule` This rule finds StringBuffers which may have been pre-sized incorrectly See http://sourceforge.net/forum/forum.php?
`class` | `StringInstantiationRule`
`class` | `StringToStringRule`
`class` | `UnnecessaryCaseChangeRule`
`class` | `UseIndexOfCharRule`
`class` | `UselessStringValueOfRule`
`class` | `UseStringBufferLengthRule` This rule finds places where StringBuffer.toString() is called just to see if the string is 0 length by either using .equals("") or toString().length() StringBuffer sb = new StringBuffer("some string"); if (sb.toString().equals("")) { // this is wrong } if (sb.length() == 0) { // this is right }

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.sunsecure

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.sunsecure
Modifier and Type | Class and Description
--- | ---
`class` | `AbstractSunSecureRule` Utility methods for the package
`class` | `ArrayIsStoredDirectlyRule`
`class` | `MethodReturnsInternalArrayRule` Implementation note: this rule currently ignores return types of y.x.z, currently it handles only local type fields.

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.unnecessary

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.unnecessary
Modifier and Type | Class and Description
--- | ---
`class` | `UnnecessaryConversionTemporaryRule`
`class` | `UnnecessaryReturnRule`
`class` | `UselessOperationOnImmutableRule` An operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself.
`class` | `UselessOverridingMethodRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.unusedcode

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.unusedcode
Modifier and Type | Class and Description
--- | ---
`class` | `UnusedFormalParameterRule`
`class` | `UnusedLocalVariableRule`
`class` | `UnusedModifierRule`
`class` | `UnusedPrivateFieldRule`
`class` | `UnusedPrivateMethodRule`

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.typeresolution.rules

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.typeresolution.rules
Modifier and Type | Class and Description
--- | ---
`class` | `CloneMethodMustImplementCloneable` The method clone() should only be implemented if the class implements the Cloneable interface with the exception of a final method that only throws CloneNotSupportedException.
`class` | `LooseCoupling` This is a separate rule, uses the type resolution facade
`class` | `SignatureDeclareThrowsException` A method/constructor shouldn't explicitly throw java.lang.Exception, since it is unclear which exceptions that can be thrown from the methods.

### Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.typeresolution.rules.imports

Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.typeresolution.rules.imports
Modifier and Type | Class and Description
--- | ---
`class` | `UnusedImports`

### Uses of AbstractJavaRule in net.sourceforge.pmd.util.designer

Subclasses of AbstractJavaRule in net.sourceforge.pmd.util.designer
Modifier and Type | Class and Description
--- | ---
`class` | `DFAGraphRule`