public final class IntroduceLocalExtensionRefactoring extends AbstractRefactoring
Modifier and Type | Class and Description |
---|---|
static class |
IntroduceLocalExtensionRefactoring.Equality
Equality defines the different ways the equals and hashcode methods can
be handled.
|
INIT, PARAMETERS_CHECK, PRE_CHECK, PREPARE
Constructor and Description |
---|
IntroduceLocalExtensionRefactoring(TreePathHandle handle)
Create a new instance of IntroduceLocalExtensionRefactoring.
|
Modifier and Type | Method and Description |
---|---|
IntroduceLocalExtensionRefactoring.Equality |
getEquality()
Get how the equals and hashCode methods will be handled.
|
String |
getNewName()
Getter for new name of the local extension.
|
String |
getPackageName()
Target for the local extension.
|
boolean |
getReplace()
Only create the extension class, or should all usages be replaced with
the new local extension.
|
FileObject |
getSourceRoot()
Target for the local extension.
|
boolean |
getWrap()
The extension class can be a subclass or a wrapper of the original.
|
void |
setEquality(IntroduceLocalExtensionRefactoring.Equality equality)
Set how the equals and hashCode methods should be handled.
|
void |
setNewName(String newName)
Setter for new name of the local extension.
|
void |
setPackageName(String packageName)
Target for the local extension.
|
void |
setReplace(boolean replace)
Only create the extension class, or should all usages be replaced with
the new local extension.
|
void |
setSourceRoot(FileObject sourceRoot)
Target for the local extension.
|
void |
setWrap(boolean wrap)
The extension class can be a subclass or a wrapper of the original.
|
addProgressListener, cancelRequest, checkParameters, fastCheckParameters, getContext, getRefactoringSource, preCheck, prepare, removeProgressListener
public IntroduceLocalExtensionRefactoring(@NonNull TreePathHandle handle)
DELEGATE
.handle
- Path to the type to refactor.@CheckForNull public String getNewName()
public void setNewName(@NullAllowed String newName)
newName
- new value for the new namepublic void setPackageName(@NullAllowed String packageName)
packageName
- IntroduceLocalExtensionRefactoring.setSourceRoot(org.openide.filesystems.FileObject)
@CheckForNull public String getPackageName()
IntroduceLocalExtensionRefactoring.setPackageName(java.lang.String)
public void setSourceRoot(FileObject sourceRoot)
sourceRoot
- IntroduceLocalExtensionRefactoring.setPackageName(java.lang.String)
@CheckForNull public FileObject getSourceRoot()
IntroduceLocalExtensionRefactoring.setSourceRoot(org.openide.filesystems.FileObject)
public void setWrap(boolean wrap)
wrap
- true if the local extension should be a wrapper class.public boolean getWrap()
public void setEquality(@NonNull IntroduceLocalExtensionRefactoring.Equality equality)
equality
- how the equals and hashcode methods should be handled.IntroduceLocalExtensionRefactoring.Equality
@NonNull public IntroduceLocalExtensionRefactoring.Equality getEquality()
IntroduceLocalExtensionRefactoring.Equality
public void setReplace(boolean replace)
replace
- true if usages need to use the new type.public boolean getReplace()