public class JavaDuplicatesExtractMethodProcessor extends ExtractMethodProcessor
myArtificialOutputVariable, myCanBeChainedConstructor, myCanBeStatic, myControlFlowWrapper, myDuplicates, myElements, myExtractedMethod, myFirstExitStatementCopy, myGenerateConditionalExit, myHasExpressionOutput, myInitialMethodName, myInputVariables, myIsChainedConstructor, myMethodName, myMethodVisibility, myNotNullConditionalCheck, myNullability, myNullConditionalCheck, myOutputVariable, myOutputVariables, myProject, myRefactoringName, myReturnType, myStatic, myTargetClass, myThrownExceptions, myTypeParameterList, myVariableDatum, SIGNATURE_CHANGE_ALLOWED
Constructor and Description |
---|
JavaDuplicatesExtractMethodProcessor(PsiElement [] elements,
Editor editor,
java.lang.String refactoringName) |
JavaDuplicatesExtractMethodProcessor(PsiElement [] elements,
java.lang.String refactoringName) |
Modifier and Type | Method and Description |
---|---|
void |
applyDefaults(java.lang.String methodName,
java.lang.String visibility) |
void |
applyFrom(ExtractMethodProcessor from,
java.util.Map<PsiVariable,PsiVariable> variablesMapping) |
DuplicatesFinder |
createDuplicatesFinder() |
void |
doExtract() |
protected boolean |
isFoldingApplicable() |
boolean |
prepare(boolean showErrorHint) |
boolean |
prepareFromSnapshot(ExtractMethodSnapshot from,
boolean showErrorHint) |
PsiElement |
processMatch(Match match) |
void |
putExtractedParameters(java.util.Map<PsiLocalVariable,ExtractedParameter> extractedParameters) |
void |
updateStaticModifier(java.util.List<Match> matches) |
addExtractedMethod, addToMethodCallLocation, apply, buildMultipleOutputMessageError, canBeStatic, changeParamName, checkOutputVariablesCount, chooseAnchor, createExtractMethodDialog, declareNecessaryVariablesAfterCall, defineVariablesForUnselectedParameters, deleteExtracted, doNotPassParameter, doRefactoring, estimateDuplicatesCount, expressionToReplace, findOccurrences, generateEmptyMethod, generateMethodCall, getAnchor, getAnyDuplicates, getArtificialOutputVariable, getConfirmDuplicatePrompt, getDuplicates, getEffectivelyLocalVariables, getElements, getExactDuplicatesFinder, getExtractedMethod, getInputVariables, getMatchMethodCallExpression, getMethodCall, getMethodName, getOutputVariables, getParameterNameGenerator, getParametrizedDuplicates, getProject, getReplaceDuplicatesTitle, getReturnType, getTargetClass, getThrownExceptions, getTypeParameterList, hasDuplicates, hasDuplicates, initDuplicates, initParametrizedDuplicates, insertNotNullCheckIfPossible, isCanBeStatic, isDeclaredInside, isNeedToChangeCallContext, isOutputVariable, isPreviewDuplicates, isStatic, prepare, prepare, prepareSignature, previewRefactoring, setChainedConstructor, setDataFromInputVariables, setMethodCall, setMethodName, setMethodVisibility, setPreviewSupported, setShowErrorDialogs, showDialog, showDialog, showMultipleOutputMessage, suggestInitialMethodName, testNullability, testPrepare, testPrepare, testRun, testTargetClass
public JavaDuplicatesExtractMethodProcessor(PsiElement [] elements, java.lang.String refactoringName)
public JavaDuplicatesExtractMethodProcessor(PsiElement [] elements, Editor editor, java.lang.String refactoringName)
public void applyFrom(ExtractMethodProcessor from, java.util.Map<PsiVariable,PsiVariable> variablesMapping)
public boolean prepareFromSnapshot(ExtractMethodSnapshot from, boolean showErrorHint)
public void applyDefaults(java.lang.String methodName, java.lang.String visibility)
public void doExtract()
doExtract
in class ExtractMethodProcessor
public void updateStaticModifier(java.util.List<Match> matches)
public void putExtractedParameters(java.util.Map<PsiLocalVariable,ExtractedParameter> extractedParameters)
public boolean prepare(boolean showErrorHint)
public PsiElement processMatch(Match match) throws IncorrectOperationException
processMatch
in interface MatchProvider
processMatch
in class ExtractMethodProcessor
IncorrectOperationException
protected boolean isFoldingApplicable()
isFoldingApplicable
in class ExtractMethodProcessor
public DuplicatesFinder createDuplicatesFinder()