Uses of Class
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
-
-
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.dfa
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.dfa Modifier and Type Class Description classJavaDFAGraphRuleDeprecated.Only used by the deprecated 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 Description classAbstractIgnoredAnnotationRuleclassAbstractInefficientZeroCheckThis is an abstract rule for patterns which compare a method invocation to 0.classAbstractJavaMetricsRuleJava Rule with convenient visit methods to e.g.classAbstractJUnitRuleclassAbstractLombokAwareRuleBase class for rules, that should ignore classes/fields that are annotated with Lombok annotations.classAbstractPoorMethodCallDetects and flags the occurrences of specific method calls against an instance of a designated class.classAbstractStatisticalJavaRuleDeprecated.seeStatisticalRuleclassGenericLiteralCheckerRuleThis class allow to match a Literal (most likely a String) with a regex pattern.classStringConcatenationRuleclassSymbolTableTestRuleclassUselessAssignment -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.bestpractices
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.bestpractices Modifier and Type Class Description classAbstractSunSecureRuleUtility methods for the package Created on Jan 17, 2005classAccessorClassGenerationRule1.classAccessorMethodGenerationRuleclassArrayIsStoredDirectlyRuleIf a method or constructor receives an array as an argument, the array should be cloned instead of directly stored.classAvoidReassigningLoopVariablesRuleclassAvoidReassigningParametersRuleclassAvoidUsingHardCodedIPRuleclassCheckResultSetRuleRule that verifies, that the return values of next(), first(), last(), etc.classForLoopCanBeForeachRuleclassGuardLogStatementRuleCheck that log.debug, log.trace, log.error, etc...classJUnitAssertionsShouldIncludeMessageRuleclassJUnitTestsShouldIncludeAssertRuleclassJUnitUseExpectedRuleThis rule finds code like this:classLooseCouplingRuleclassMethodReturnsInternalArrayRuleImplementation note: this rule currently ignores return types of y.x.z, currently it handles only local type fields.classMissingOverrideRuleFlags missing @Override annotations.classPreserveStackTraceRuleclassUnusedFormalParameterRuleclassUnusedImportsRuleclassUnusedLocalVariableRuleclassUnusedPrivateFieldRuleclassUnusedPrivateMethodRuleThis rule detects private methods, that are not used and can therefore be deleted.classUseCollectionIsEmptyRuleDetect structures like "foo.size() == 0" and suggest replacing them with foo.isEmpty(). -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.codestyle
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.codestyle Modifier and Type Class Description classAtLeastOneConstructorRuleThis rule detects non-static classes with no constructors; requiring even the default constructor to be explicit.classAvoidDollarSignsRuleclassClassNamingConventionsRuleConfigurable naming conventions for type declarations.classCommentDefaultAccessModifierRuleCheck for Methods, Fields and Nested Classes that have a default access modifier This rule ignores all nodes annotated with @VisibleForTesting by default.classConfusingTernaryRuleif (x != y) { diff(); } else { same(); }and
(!x ? diff() : same());classDontImportJavaLangRuleclassDuplicateImportsRuleclassFieldDeclarationsShouldBeAtStartOfClassRuleDetects fields that are declared after methods, constructors, etc.classFieldNamingConventionsRuleConfigurable naming conventions for field declarations.classFormalParameterNamingConventionsRuleEnforces a naming convention for lambda and method parameters.classIdenticalCatchBranchesRuleFlags identical catch branches, which can be collapsed into a multi-catch.classLinguisticNamingRuleclassLocalVariableCouldBeFinalRuleclassLocalVariableNamingConventionsRuleEnforces a naming convention for local variables and other locally scoped variables.classMethodArgumentCouldBeFinalRuleclassMethodNamingConventionsRuleclassOnlyOneReturnRuleclassPrematureDeclarationRuleChecks for variables in methods that are defined before they are really needed.classUnnecessaryAnnotationValueElementRuleclassUnnecessaryConstructorRuleThis rule detects when a constructor is not necessary; i.e., when there is only one constructor, it’s public, has an empty body, and takes no arguments.classUnnecessaryFullyQualifiedNameRuleclassUnnecessaryLocalBeforeReturnRuleclassUnnecessaryModifierRuleclassUnnecessaryReturnRuleclassVariableNamingConventionsRuleDeprecated. -
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 Description classAbstractNcssCountRuleAbstract superclass for NCSS counting methods.classAvoidDeeplyNestedIfStmtsRuleclassCouplingBetweenObjectsRuleCouplingBetweenObjects attempts to capture all unique Class attributes, local variables, and return types to determine how many objects a class is coupled to.classCyclomaticComplexityRuleCyclomatic complexity rule using metrics.classDataClassRuleclassExceptionAsFlowControlRuleCatches the use of exception statements as a flow control device.classExcessiveClassLengthRuleThis rule detects when a class exceeds a certain threshold.classExcessiveImportsRuleExcessiveImports attempts to count all unique imports a class contains.classExcessiveLengthRuleThis is a common super class for things which have excessive length.classExcessiveMethodLengthRuleThis rule detects when a method exceeds a certain threshold.classExcessiveNodeCountRuleThis is a common super class for things which shouldn't have excessive nodes underneath.classExcessiveParameterListRuleThis rule detects an abnormally long parameter list.classExcessivePublicCountRuleRule attempts to count all public methods and public attributes defined in a class.classGenericClassCounterRuleA 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.classGodClassRuleThe God Class Rule detects the God Class design flaw using metrics.classImmutableFieldRuleclassLawOfDemeterRuleThis rule can detect possible violations of the Law of Demeter.classLoosePackageCouplingRuleThe 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.classModifiedCyclomaticComplexityRuleDeprecated.classNcssConstructorCountRuleDeprecated.classNcssCountRuleSimple rule for Ncss.classNcssMethodCountRuleDeprecated.classNcssTypeCountRuleDeprecated.classNPathComplexityRuleSimple n-path complexity rule.classPositionalIteratorRuleclassSignatureDeclareThrowsExceptionRuleA method/constructor shouldn't explicitly throw java.lang.Exception, since it is unclear which exceptions that can be thrown from the methods.classSimplifyBooleanReturnsRuleclassSingularFieldRuleclassStdCyclomaticComplexityRuleDeprecated.classSwitchDensityRuleSwitch Density - This is the number of statements over the number of cases within a switch.classTooManyFieldsRuleclassUselessOverridingMethodRuleclassUseUtilityClassRule -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.documentation
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.documentation Modifier and Type Class Description classAbstractCommentRuleclassCodeInCommentsRuleclassCommentContentRuleA rule that checks for illegal words in the comment text.classCommentRequiredRuleclassCommentSizeRuleA rule to manage those who just can't shut up...classHeaderCommentsRuleRestrictions regarding the legal placement and content of the file header.classJavadocRule -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.errorprone
-
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 Description classUnnecessaryCastRuleThis is a rule, that detects unnecessary casts when using Java 1.5 generics and collections. -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.multithreading
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.multithreading Modifier and Type Class Description classDoubleCheckedLockingRulevoid method() { if (x == null) { synchronized(this){ if (x == null) { x = new | method(); } } } }classNonThreadSafeSingletonRuleclassUnsynchronizedStaticDateFormatterRuleDeprecated.This rule is being replaced byUnsynchronizedStaticFormatterRule.classUnsynchronizedStaticFormatterRuleUsing a Formatter (e.g. -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.performance
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.performance Modifier and Type Class Description classAbstractOptimizationRuleBase class with utility methods for optimization rulesclassAppendCharacterWithCharRuleThis rule finds the following:classAvoidInstantiatingObjectsInLoopsRuleclassBigIntegerInstantiationRuleRule that marks instantiations of newBigIntegerorBigDecimalobjects, when there is a well-known constant available, such asBigInteger.ZERO.classBooleanInstantiationRuleAvoid instantiating Boolean objects; you can reference Boolean.TRUE, Boolean.FALSE, or call Boolean.valueOf() instead.classConsecutiveAppendsShouldReuseRuleclassConsecutiveLiteralAppendsRuleThis 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.appendclassInefficientEmptyStringCheckRuleThis rule finds code which inefficiently determines empty strings.classInefficientStringBufferingRuleHow 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.classInsufficientStringBufferDeclarationRuleThis rule finds StringBuffers which may have been pre-sized incorrectly.classRedundantFieldInitializerRuleDetects redundant field initializers, i.e.classStringInstantiationRuleclassStringToStringRuleclassUnnecessaryWrapperObjectCreationRuleclassUseIndexOfCharRuleclassUselessStringValueOfRuleclassUseStringBufferForStringAppendsRuleclassUseStringBufferLengthRuleThis rule finds places where StringBuffer.toString() is called just to see if the string is 0 length by either using .equals("") or toString().length(). -
Uses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.security
Subclasses of AbstractJavaRule in net.sourceforge.pmd.lang.java.rule.security Modifier and Type Class Description classHardCodedCryptoKeyRuleFinds hard coded encryption keys that are passed to javax.crypto.spec.SecretKeySpec(key, algorithm).classInsecureCryptoIvRuleFinds hardcoded static Initialization Vectors vectors used with cryptographic operations.
-