Class AvoidBranchingStatementAsLastInLoopRule
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.lang.rule.AbstractRule
-
- net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
-
- net.sourceforge.pmd.lang.java.rule.AbstractJavaRulechainRule
-
- net.sourceforge.pmd.lang.java.rule.errorprone.AvoidBranchingStatementAsLastInLoopRule
-
- All Implemented Interfaces:
AstVisitor<Object,Object>
,JavaParserVisitor
,JavaVisitor<Object,Object>
,PropertySource
,Rule
public class AvoidBranchingStatementAsLastInLoopRule extends AbstractJavaRulechainRule
-
-
Field Summary
Fields Modifier and Type Field Description static PropertyDescriptor<List<String>>
CHECK_BREAK_LOOP_TYPES
static PropertyDescriptor<List<String>>
CHECK_CONTINUE_LOOP_TYPES
static String
CHECK_DO
static String
CHECK_FOR
static PropertyDescriptor<List<String>>
CHECK_RETURN_LOOP_TYPES
static String
CHECK_WHILE
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
Fields inherited from interface net.sourceforge.pmd.Rule
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
-
Constructor Summary
Constructors Constructor Description AvoidBranchingStatementAsLastInLoopRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
check(PropertyDescriptor<List<String>> property, Node node, Object data)
boolean
checksNothing()
String
dysfunctionReason()
protected boolean
hasPropertyValue(PropertyDescriptor<List<String>> property, String value)
Object
visit(ASTBreakStatement node, Object data)
Object
visit(ASTContinueStatement node, Object data)
Object
visit(ASTReturnStatement node, Object data)
-
Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractJavaRulechainRule
buildTargetSelector, visitJavaNode
-
Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
apply
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, asCtx, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getPropertySourceType, getRuleClass, getRuleSetName, getSince, getTargetSelector, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, start
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.AstVisitor
cannotVisit
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaParserVisitor
visit, visit, visit, visit, visit, visit, visitNode
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty, setProperty
-
Methods inherited from interface net.sourceforge.pmd.Rule
initialize
-
-
-
-
Field Detail
-
CHECK_FOR
public static final String CHECK_FOR
- See Also:
- Constant Field Values
-
CHECK_DO
public static final String CHECK_DO
- See Also:
- Constant Field Values
-
CHECK_WHILE
public static final String CHECK_WHILE
- See Also:
- Constant Field Values
-
CHECK_BREAK_LOOP_TYPES
public static final PropertyDescriptor<List<String>> CHECK_BREAK_LOOP_TYPES
-
CHECK_CONTINUE_LOOP_TYPES
public static final PropertyDescriptor<List<String>> CHECK_CONTINUE_LOOP_TYPES
-
CHECK_RETURN_LOOP_TYPES
public static final PropertyDescriptor<List<String>> CHECK_RETURN_LOOP_TYPES
-
-
Method Detail
-
visit
public Object visit(ASTBreakStatement node, Object data)
-
hasPropertyValue
protected boolean hasPropertyValue(PropertyDescriptor<List<String>> property, String value)
-
visit
public Object visit(ASTContinueStatement node, Object data)
-
visit
public Object visit(ASTReturnStatement node, Object data)
-
dysfunctionReason
public String dysfunctionReason()
- Specified by:
dysfunctionReason
in interfacePropertySource
- Overrides:
dysfunctionReason
in classAbstractPropertySource
-
checksNothing
public boolean checksNothing()
-
-