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 classChangeMethodSignatureArguments.ParameterInstances ofChangeMethodSignatureArguments.Parameterare used to describe the new parameters after a change method signature refactoring.static classChangeMethodSignatureArguments.ThrownExceptionInstances ofChangeMethodSignatureArguments.ThrownExceptionare 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 booleangetKeepOriginal()Returns whether the original method is kept as a delegate to the new one.StringgetNewName()Returns the new method name.ChangeMethodSignatureArguments.Parameter[]getNewParameters()Returns the new parameters of this method.StringgetNewReturnType()Returns the type signature of the new return type of this method.intgetNewVisibility()Returns the new visibility of this method.ChangeMethodSignatureArguments.ThrownException[]getThrownExceptions()Returns the new thrown exceptions of this method.StringtoString()
-
-
-
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.AccPrivateor0for the default visibility.newParameters- the new parameters of this methodthrownExceptions- the new exceptions thrown by this methodkeepOriginal-trueif the original method is kept as a delegate to the new one,falseotherwise
-
-
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.AccPrivateor0for 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
trueif the original method is keptfalseotherwise
-
toString
public String toString()
- Overrides:
toStringin classRefactoringArguments
-
-