Class SimpleSanitizer
- java.lang.Object
-
- biz.gabrys.maven.plugin.util.parameter.sanitizer.AbstractSimpleSanitizer
-
- biz.gabrys.maven.plugin.util.parameter.sanitizer.SimpleSanitizer
-
- All Implemented Interfaces:
ValueSanitizer
public class SimpleSanitizer extends AbstractSimpleSanitizer
Simple value sanitizer which returns a declared sanitized value when specified condition returnstrue.- Since:
- 1.3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectsanitizedValueThe sanitized value.-
Fields inherited from class biz.gabrys.maven.plugin.util.parameter.sanitizer.AbstractSimpleSanitizer
valid
-
-
Constructor Summary
Constructors Constructor Description SimpleSanitizer(boolean valid, Object sanitizedValue)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectsanitize2(Object value)Returns a sanitized value specified during construction ofthisobject.-
Methods inherited from class biz.gabrys.maven.plugin.util.parameter.sanitizer.AbstractSimpleSanitizer
isValid, sanitize
-
-
-
-
Field Detail
-
sanitizedValue
protected final Object sanitizedValue
The sanitized value.- Since:
- 1.3.0
-
-
Constructor Detail
-
SimpleSanitizer
public SimpleSanitizer(boolean valid, Object sanitizedValue)Constructs a new instance.- Parameters:
valid-truewhether parameter current value is valid, otherwisefalse.sanitizedValue- the sanitized value which will be returned byAbstractSimpleSanitizer.sanitize(Object)method.- Since:
- 1.3.0
-
-
Method Detail
-
sanitize2
protected Object sanitize2(Object value)
Returns a sanitized value specified during construction ofthisobject.- Specified by:
sanitize2in classAbstractSimpleSanitizer- Parameters:
value- the parameter value (ignored).- Returns:
- the sanitized value.
- Since:
- 1.3.0
- See Also:
SimpleSanitizer(boolean, Object)
-
-