public static final class ReplaceConstructorWithBuilderRefactoring.Setter extends Object
Constructor and Description |
---|
Setter(String name,
String type,
String defaultValue,
String varName,
boolean optional)
The only way how to create setter.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultValue()
Getter for default value.
|
String |
getName()
Getter for setter name.
|
String |
getType()
Getter for type.
|
String |
getVarName()
Getter for variable name.
|
boolean |
isOptional()
Getter for optional.
|
public Setter(@NonNull String name, @NonNull String type, @NullAllowed String defaultValue, @NonNull String varName, boolean optional)
name
- the name of the setter. For instance "setA"type
- the type of the setter. For instance "int"defaultValue
- the default value. Might be null. For instance "1".varName
- the name of the variable. For instance "a".optional
- true if the setter is optional in case, that argument is the same as default value.public boolean isOptional()
public String getDefaultValue()