Class ChangeMethodSignatureArguments.Parameter

    • Constructor Detail

      • Parameter

        public Parameter​(int oldIndex,
                         String newName,
                         String newSignature,
                         String defaultValue)
        Parameters:
        oldIndex - the index of the parameter in the original method or -1 if the parameter is a new parameter.
        newName - the new name of the parameter.
        newSignature - the new type of the parameter in signature notation (See Signature).
        defaultValue - the default value for new parameters or null.
    • Method Detail

      • getOldIndex

        public int getOldIndex()
        Returns the index of the parameter in the original method or -1 if the parameter has been added.
        Returns:
        the index of the parameter in the original method or -1 if the parameter has been added
      • getName

        public String getName()
        Returns the new name of the parameter. If the name has not been changed by the refactoring, the original parameter name is returned.
        Returns:
        the new parameter name
      • getType

        public String getType()
        Returns the new type of the parameter in signature notation (See Signature). If the type has not been changed by the refactoring, the original type signature is returned.
        Returns:
        the the new type
      • getDefaultValue

        public String getDefaultValue()
        The default value for new parameters or null.
        Returns:
        returns the default value for new parameters or null.