Class ChangeMethodSignatureArguments
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.participants.RefactoringArguments
-
- org.eclipse.jdt.core.refactoring.participants.ChangeMethodSignatureArguments
-
public class ChangeMethodSignatureArguments extends RefactoringArguments
Change method signature arguments describe the data that a processor provides to its change signature participantsThis class is not intended to be subclassed by clients.
- Since:
- 1.2
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChangeMethodSignatureArguments.Parameter
Instances ofChangeMethodSignatureArguments.Parameter
are used to describe the new parameters after a change method signature refactoring.static class
ChangeMethodSignatureArguments.ThrownException
Instances ofChangeMethodSignatureArguments.ThrownException
are used to describe the new thrown exceptions after a change method signature refactoring.
-
Constructor Summary
Constructors Constructor Description ChangeMethodSignatureArguments(String newName, String newReturnType, int newVisibility, ChangeMethodSignatureArguments.Parameter[] newParameters, ChangeMethodSignatureArguments.ThrownException[] thrownExceptions, boolean keepOriginal)
Creates new change method signature arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getKeepOriginal()
Returns whether the original method is kept as a delegate to the new one.String
getNewName()
Returns the new method name.ChangeMethodSignatureArguments.Parameter[]
getNewParameters()
Returns the new parameters of this method.String
getNewReturnType()
Returns the type signature of the new return type of this method.int
getNewVisibility()
Returns the new visibility of this method.ChangeMethodSignatureArguments.ThrownException[]
getThrownExceptions()
Returns the new thrown exceptions of this method.String
toString()
-
-
-
Constructor Detail
-
ChangeMethodSignatureArguments
public ChangeMethodSignatureArguments(String newName, String newReturnType, int newVisibility, ChangeMethodSignatureArguments.Parameter[] newParameters, ChangeMethodSignatureArguments.ThrownException[] thrownExceptions, boolean keepOriginal)
Creates new change method signature arguments.- Parameters:
newName
- the new name of the element to be changednewReturnType
- the new method return type in signature notation (seeSignature
).newVisibility
- the new visibility; one ofFlags.AccPublic
,Flags.AccProtected
,Flags.AccPrivate
or0
for the default visibility.newParameters
- the new parameters of this methodthrownExceptions
- the new exceptions thrown by this methodkeepOriginal
-true
if the original method is kept as a delegate to the new one,false
otherwise
-
-
Method Detail
-
getNewName
public String getNewName()
Returns the new method name. If the name has not been changed by the refactoring, the original parameter name is returned.- Returns:
- the method name
-
getNewReturnType
public String getNewReturnType()
Returns the type signature of the new return type of this method. For constructors, this returns the signature for void. If the return type has not been changed by the refactoring, the original return type signature is returned.- Returns:
- the new return type
-
getNewVisibility
public int getNewVisibility()
Returns the new visibility of this method. The visibility is one ofFlags.AccPublic
,Flags.AccProtected
,Flags.AccPrivate
or0
for the default visibility. If the visibility has not been changed by the refactoring, the original visibility is returned.- Returns:
- the visibility of the method
-
getNewParameters
public ChangeMethodSignatureArguments.Parameter[] getNewParameters()
Returns the new parameters of this method.- Returns:
- the new parameters of this method
-
getThrownExceptions
public ChangeMethodSignatureArguments.ThrownException[] getThrownExceptions()
Returns the new thrown exceptions of this method.- Returns:
- new thrown exceptions of this method
-
getKeepOriginal
public boolean getKeepOriginal()
Returns whether the original method is kept as a delegate to the new one.- Returns:
- returns
true
if the original method is keptfalse
otherwise
-
toString
public String toString()
- Overrides:
toString
in classRefactoringArguments
-
-