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 implementingconverterswhich are null safe.- Since:
- 1.3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringNULL_STRINGString representation ofnullvalue.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractValueToStringConverter()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringconvert(Object value)Converts a parameter value to string representation.protected abstract Stringconvert2(Object value)Converts a parameter value to string representation.
-
-
-
Field Detail
-
NULL_STRING
protected static final String NULL_STRING
String representation ofnullvalue.- 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:
convertin interfaceValueToStringConverter- Parameters:
value- the parameter value (can benull).- Returns:
- the string representation of the parameter value (never
null). - Since:
- 1.3.0
-
-