org.netbeans.modules.refactoring.java/1 1.5

org.netbeans.modules.refactoring.java.api
Class ChangeParametersRefactoring.ParameterInfo

java.lang.Object
  extended by org.netbeans.modules.refactoring.java.api.ChangeParametersRefactoring.ParameterInfo
Enclosing class:
ChangeParametersRefactoring

public static final class ChangeParametersRefactoring.ParameterInfo
extends Object

Represents one item for setParameters(List params) list parameter. Item contains information about changes in method parameters. Parameter can be added, changed or moved to another position.


Constructor Summary
ChangeParametersRefactoring.ParameterInfo(int origIndex)
          Creates a new instance of ParameterInfo.
ChangeParametersRefactoring.ParameterInfo(int origIndex, String name, String type, String defaultVal)
          Creates a new instanceof of ParameterInfo.
 
Method Summary
 String getDefaultValue()
          Returns value of the default value in case of the new parameter.
 String getName()
          Returns value of the name of parameter.
 int getOriginalIndex()
          Returns value of original parameter index.
 String getType()
          Returns value of the type of parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeParametersRefactoring.ParameterInfo

public ChangeParametersRefactoring.ParameterInfo(int origIndex,
                                                 String name,
                                                 String type,
                                                 String defaultVal)
Creates a new instanceof of ParameterInfo. This constructor can be used for newly added parameters or changed original parameters. When you call method with -1 origIndex, you have to provide not null values in all other pamarameters, otherwise it throws an IllegalArgumentException.

Parameters:
origIndex - for newly added parameters, use -1, otherwise use index in original parameters list
name - parameter name
type - parameter type
defaultVal - should be provided for the all new parameters. For changed parameters, it is ignored.

ChangeParametersRefactoring.ParameterInfo

public ChangeParametersRefactoring.ParameterInfo(int origIndex)
Creates a new instance of ParameterInfo. This constructor is used for existing non-changed parameters. All the values except original position in parameters list is set to null.

Parameters:
origIndex - position index in original parameters list
Method Detail

getOriginalIndex

public int getOriginalIndex()
Returns value of original parameter index.

Returns:
original index of parameter in parameters list

getName

public String getName()
Returns value of the name of parameter. If the name was not changed, returns null.

Returns:
new name for parameter or null in case that it was not changed.

getType

public String getType()
Returns value of the type of parameter. If the name was not changed, returns null.

Returns:
new type for parameter or null if it was not changed.

getDefaultValue

public String getDefaultValue()
Returns value of the default value in case of the new parameter. Otherwise, it returns null.

Returns:
default value for new parameter, otherwise null.

org.netbeans.modules.refactoring.java/1 1.5

Built on December 1 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.