Class ChangeMethodSignatureArguments
java.lang.Object
org.eclipse.ltk.core.refactoring.participants.RefactoringArguments
org.eclipse.jdt.core.refactoring.participants.ChangeMethodSignatureArguments
public class ChangeMethodSignatureArguments
extends org.eclipse.ltk.core.refactoring.participants.RefactoringArguments
Change method signature arguments describe the data that a processor
provides to its change signature participants
This 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
Modifier and TypeClassDescriptionstatic final class
Instances ofChangeMethodSignatureArguments.Parameter
are used to describe the new parameters after a change method signature refactoring.static final class
Instances ofChangeMethodSignatureArguments.ThrownException
are used to describe the new thrown exceptions after a change method signature refactoring. -
Constructor Summary
ConstructorDescriptionChangeMethodSignatureArguments
(String newName, String newReturnType, int newVisibility, ChangeMethodSignatureArguments.Parameter[] newParameters, ChangeMethodSignatureArguments.ThrownException[] thrownExceptions, boolean keepOriginal) Creates new change method signature arguments. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the original method is kept as a delegate to the new one.Returns the new method name.Returns the new parameters of this method.Returns the type signature of the new return type of this method.int
Returns the new visibility of this method.Returns the new thrown exceptions of this method.toString()
-
Constructor Details
-
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 Details
-
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
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
Returns the new parameters of this method.- Returns:
- the new parameters of this method
-
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
- Overrides:
toString
in classorg.eclipse.ltk.core.refactoring.participants.RefactoringArguments
-