## net.sourceforge.pmd.rules.optimization
Class AbstractOptimizationRule

    java.lang.Object
      net.sourceforge.pmd.ast.JavaParserVisitorAdapter
          net.sourceforge.pmd.AbstractRule
              net.sourceforge.pmd.rules.optimization.AbstractOptimizationRule

All Implemented Interfaces:
  JavaParserVisitor, Rule

Direct Known Subclasses:
  AvoidInstantiatingObjectsInLoops, LocalVariableCouldBeFinal, MethodArgumentCouldBeFinal

public class AbstractOptimizationRule
extends AbstractRule
implements Rule

Base class with utility methods for optimization rules

Author:
  mgriffa

Field Summary

Fields inherited from class net.sourceforge.pmd.AbstractRule
`description, example, externalInfoUrl, include, message, name, priority, properties, ruleSetName, usesDFA`

Fields inherited from interface net.sourceforge.pmd.Rule
`LOWEST_PRIORITY, PRIORITIES`

Constructor Summary
`AbstractOptimizationRule()`

Method Summary
`protected java.lang.String` `getVarName(ASTLocalVariableDeclaration node)`
`protected boolean` `isVarWritterInMethod(java.lang.String varName, ASTMethodDeclaration md)`

Methods inherited from class net.sourceforge.pmd.AbstractRule

`addProperties, addProperty, addViolation, addViolation, addViolation, addViolationWithMessage, apply, equals, getBooleanProperty, getDeclaringType, getDescription, getDoubleProperty, getExample, getExternalInfoUrl, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getRuleSetName, getStringProperty, hashCode, hasProperty, include, setDescription, setExample, setExternalInfoUrl, setInclude, setMessage, setName, setPriority, setRuleSetName, setUsesDFA, usesDFA, visitAll`

Methods inherited from class net.sourceforge.pmd.ast.JavaParserVisitorAdapter

`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 class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface net.sourceforge.pmd.Rule
`addProperties, addProperty, apply, getBooleanProperty, getDescription, getDoubleProperty, getExample, getExternalInfoUrl, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getRuleSetName, getStringProperty, hasProperty, include, setDescription, setExample, setExternalInfoUrl, setInclude, setMessage, setName, setPriority, setRuleSetName, setUsesDFA, usesDFA`

Constructor Detail

### AbstractOptimizationRule

    public AbstractOptimizationRule()

Method Detail

### isVarWritterInMethod

    protected final boolean isVarWritterInMethod(java.lang.String varName,
                                                 ASTMethodDeclaration md)

### getVarName

    protected final java.lang.String getVarName(ASTLocalVariableDeclaration node)

Copyright © 2002-2006 InfoEther. All Rights Reserved.