Class DoubleConverter
java.lang.Object
name.matthewgreet.strutscommons.policy.AbstractPolicySupport<DoubleConversion>
name.matthewgreet.strutscommons.policy.AbstractConverterSupport<DoubleConversion, Double>
name.matthewgreet.strutscommons.policy.AbstractDefaultConverterSupport<DoubleConversion, Double>
name.matthewgreet.strutscommons.policy.DoubleConverter
- All Implemented Interfaces:
Converter<DoubleConversion, Double>, DefaultPolicy, Policy<DoubleConversion>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns result of conversion of form field.Returns single field value formatted for display in a form field.Returns message set by annotation.Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.Returns whether to write any error message to action errors, field errors, or action messages.booleanReturns type of recipient fields that can receive converted form value.Returns name of field to receive converted form value, which can be empty string to use default.protected DoubleConversionMethods inherited from class AbstractDefaultConverterSupport
getAnnotationMethods inherited from class AbstractPolicySupport
setAnnotationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Policy
setAnnotation
-
Constructor Details
-
DoubleConverter
public DoubleConverter()
-
-
Method Details
-
makeDefaultAnnotation
- Specified by:
makeDefaultAnnotationin classAbstractDefaultConverterSupport<DoubleConversion, Double>
-
format
Description copied from interface:ConverterReturns single field value formatted for display in a form field. Only applies single value recipients. Not called if the unformatted value is null, unlessConverter.getProcessNoValue()returns true..- Throws:
Exception
-
getRecipientClass
-
getMessageType
Description copied from interface:ConverterReturns whether to write any error message to action errors, field errors, or action messages. -
getMessage
Description copied from interface:ConverterReturns message set by annotation. Used ifConverter.getMessageKey()is empty string or it fails to find a message. -
getMessageKey
-
getRecipientFieldName
-
convert
public ConversionResult<Double> convert(String formValue, Class<? extends Double> recipientClass) throws Exception Description copied from interface:ConverterReturns result of conversion of form field. This is not called if the form value is empty string or null, unlessConverter.getProcessNoValue()returns true.- Throws:
Exception
-
getProcessNoValue
-