TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.analysis.codereview.java.internal.quickfix.comparison
Class RuleComparisonClassNameQuickFix

java.lang.Object
  extended by org.eclipse.tptp.platform.analysis.core.quickfix.AbstractAnalysisQuickFix
      extended by org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix
          extended by 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"));


Field Summary
 
Fields inherited from class org.eclipse.tptp.platform.analysis.codereview.java.quickfix.JavaCodeReviewQuickFix
EMPTY_MONITOR
 
Constructor Summary
RuleComparisonClassNameQuickFix()
           
 
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
 

Constructor Detail

RuleComparisonClassNameQuickFix

public RuleComparisonClassNameQuickFix()
Method Detail

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

TPTP 4.6.0 Platform Project
Internal API Specification