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
,JavaVisitor
,Rule
,PropertySource
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 interface net.sourceforge.pmd.lang.rule.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, visitNode
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, asCtx, deepCopy, 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
definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, 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.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, visit, visit, visit, visit
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty
-
Methods inherited from interface net.sourceforge.pmd.lang.rule.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()
-
checksNothing
public boolean checksNothing()
-
-