Class ByteConverter
java.lang.Object
com.atlassian.jira.webwork.parameters.ByteConverter
- All Implemented Interfaces:
ParameterConverter
- Since:
- v3.13.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkPrimitiveInput
(String parameterValue, Class paramType, String bundleKey) Throws a PropertyEditorException just like webwork1 when a value is a primitive AND the string is emptyconvertParameter
(String[] parameterValues, Class paramType) This is called to perform the conversion.protected boolean
The same test that webwork1 uses for null-able Longs/Integers/Shorts/Bytes
-
Constructor Details
-
ByteConverter
public ByteConverter()
-
-
Method Details
-
convertParameter
public Object convertParameter(String[] parameterValues, Class paramType) throws IllegalArgumentException Description copied from interface:ParameterConverter
This is called to perform the conversion. The parameterValues will always be a String[] of length 1 or more. It can never be null.- Parameters:
parameterValues
- a String[] that is never null and at least length 1 or more.paramType
- the type of the target object- Returns:
- a converted object of the right type
- Throws:
IllegalArgumentException
- if the value cant be converted
-
isEmpty
The same test that webwork1 uses for null-able Longs/Integers/Shorts/Bytes- Parameters:
parameterValue
- the parameter value- Returns:
- true if its an empty string
-
checkPrimitiveInput
Throws a PropertyEditorException just like webwork1 when a value is a primitive AND the string is empty- Parameters:
parameterValue
- the value in playparamType
- the type of parameterbundleKey
- the webwork1 bundle key to use
-