org.eclipse.tptp.platform.analysis.codereview.java.internal.quickfix.comparison
Class RuleComparisonClassNameQuickFix
java.lang.Object
org.eclipse.tptp.platform.analysis.core.quickfix.AbstractAnalysisQuickFix
org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix
org.eclipse.tptp.platform.analysis.codereview.java.internal.quickfix.comparison.RuleComparisonClassNameQuickFix
- All Implemented Interfaces:
- org.eclipse.core.runtime.IExecutableExtension, org.eclipse.tptp.platform.analysis.core.quickfix.IAnalysisQuickFix
public class RuleComparisonClassNameQuickFix
- extends org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix
QuickFix for the rule RuleComparisonClassName
Replaces class.getName().equals(arg) to use class.equals(Class.forName(arg)) instead
e.g
this.getClass().getName().equals("test"); -> this.getClass().equals(Class.forName("test"));
| Fields inherited from class org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix |
EMPTY_MONITOR |
|
Method Summary |
org.eclipse.text.edits.TextEdit |
fixCodeReviewResult(org.eclipse.jdt.core.dom.ASTNode theNode,
org.eclipse.jface.text.IDocument docToChange)
|
| Methods inherited from class org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix |
getASTNodeAsString, getCodeReviewResult, getTextEdit, getWorkingCompilationUnit, quickfix |
| Methods inherited from class org.eclipse.tptp.platform.analysis.core.quickfix.AbstractAnalysisQuickFix |
getId, getLabel, setId, setInitializationData, setLabel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleComparisonClassNameQuickFix
public RuleComparisonClassNameQuickFix()
fixCodeReviewResult
public org.eclipse.text.edits.TextEdit fixCodeReviewResult(org.eclipse.jdt.core.dom.ASTNode theNode,
org.eclipse.jface.text.IDocument docToChange)
- Specified by:
fixCodeReviewResult in class org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix