Class MOAPropertyValueConverter

  • All Implemented Interfaces:
    Serializable

    public class MOAPropertyValueConverter
    extends adams.flow.core.AbstractPropertyValueConverter
    Handler for MOA classes. Values for arrays are assumed to be blank-separated strings (one element per array value).
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_CommandLineHandler

        protected MOACommandLineHandler m_CommandLineHandler
        the commandline handler to use.
    • Constructor Detail

      • MOAPropertyValueConverter

        public MOAPropertyValueConverter()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes member variables.
        Overrides:
        initialize in class adams.flow.core.AbstractPropertyValueConverter
      • handles

        public boolean handles​(Class cls)
        Checks whether this converter handles the particular class.
        Specified by:
        handles in class adams.flow.core.AbstractPropertyValueConverter
        Parameters:
        cls - the class to check
        Returns:
        true if it supports it
      • convert

        public Object convert​(Class cls,
                              String value)
                       throws Exception
        Converts the variable value into the appropriate object, if possible.
        Specified by:
        convert in class adams.flow.core.AbstractPropertyValueConverter
        Parameters:
        cls - the type of the property
        value - the string to convert
        Returns:
        the converted value or null if it cannot be converted
        Throws:
        Exception - if conversion fails with an error