Class AbstractValueToStringConverter
- java.lang.Object
-
- biz.gabrys.maven.plugin.util.parameter.converter.AbstractValueToStringConverter
-
- All Implemented Interfaces:
ValueToStringConverter
- Direct Known Subclasses:
CollectionToStringConverter
,DefaultValueToStringConverter
public abstract class AbstractValueToStringConverter extends Object implements ValueToStringConverter
Helps in implementingconverters
which are null safe.- Since:
- 1.3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
NULL_STRING
String representation ofnull
value.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractValueToStringConverter()
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
convert(Object value)
Converts a parameter value to string representation.protected abstract String
convert2(Object value)
Converts a parameter value to string representation.
-
-
-
Field Detail
-
NULL_STRING
protected static final String NULL_STRING
String representation ofnull
value.- Since:
- 1.3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
convert
public String convert(Object value)
Converts a parameter value to string representation. This method is null safe.- Specified by:
convert
in interfaceValueToStringConverter
- Parameters:
value
- the parameter value (can benull
).- Returns:
- the string representation of the parameter value (never
null
). - Since:
- 1.3.0
-
-