|
org.netbeans.modules.refactoring.java/1 1.37.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.refactoring.api.AbstractRefactoring
org.netbeans.modules.refactoring.java.api.IntroduceParameterRefactoring
public final class IntroduceParameterRefactoring
Introduce parameter refactoring
RefactoringPlugin,
RefactoringPluginFactory,
AbstractRefactoring,
RefactoringSession| Field Summary |
|---|
| Fields inherited from class org.netbeans.modules.refactoring.api.AbstractRefactoring |
|---|
INIT, PARAMETERS_CHECK, PRE_CHECK, PREPARE |
| Constructor Summary | |
|---|---|
IntroduceParameterRefactoring(TreePathHandle handle)
Creates a new instance of introduce parameter refactoring. |
|
| Method Summary | |
|---|---|
String |
getParameterName()
The name used for the new parameter. |
boolean |
isFinal()
Make the new Parameter final in the method declaration. |
boolean |
isOverloadMethod()
Create a new overloading method with the new parameter and let the existing method delegate to it: e.g. |
boolean |
isReplaceAll()
Replace all occurrences. |
void |
setFinal(boolean isFinal)
Make the new Parameter final in the method declaration. |
void |
setOverloadMethod(boolean overloadMethod)
Create a new overloading method with the new parameter and let the existing method delegate to it: e.g. |
void |
setParameterName(String parameterName)
Change the name to use for the new Parameter. |
void |
setReplaceAll(boolean isReplaceAll)
Replace all occurrences. |
| Methods inherited from class org.netbeans.modules.refactoring.api.AbstractRefactoring |
|---|
addProgressListener, cancelRequest, checkParameters, fastCheckParameters, getContext, getRefactoringSource, preCheck, prepare, removeProgressListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntroduceParameterRefactoring(@NonNull
TreePathHandle handle)
a + b, or an variable declaration, e.g.
String s = "Hello World!";
handle - the element to be refactored| Method Detail |
|---|
public boolean isOverloadMethod()
int foo() {
return 1+1;
}
if "1+1" is selected, the code is converted to
int foo() {
return foo(1+1);
}
int foo(int newparam) {
return newparam;
}
public void setOverloadMethod(boolean overloadMethod)
int foo() {
return 1+1;
}
if "1+1" is selected, the code is converted to
int foo() {
return foo(1+1);
}
int foo(int newparam) {
return newparam;
}
overloadMethod - true if you want to create a new overloading methodpublic boolean isFinal()
int foo(final in newparam) {
return newparam;
}
public void setFinal(boolean isFinal)
int foo(final in newparam) {
return newparam;
}
isFinal - true if the new parameter should be finalpublic boolean isReplaceAll()
int foo() {
Sysmte.out.printline(1+1);
return 1+1;
}
if "1+1" is selected, the code is converted to
int foo(int newparam) {
Sysmte.out.printline(newparam);
return newparam;
}
public void setReplaceAll(boolean isReplaceAll)
int foo() {
Sysmte.out.printline(1+1);
return 1+1;
}
if "1+1" is selected, the code is converted to
int foo(int newparam) {
Sysmte.out.printline(newparam);
return newparam;
}
isReplaceAll - true if all occurrences should be changed@NonNull public String getParameterName()
public void setParameterName(@NonNull
String parameterName)
parameterName - a non empty String to use as the parameter name
|
org.netbeans.modules.refactoring.java/1 1.37.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||