Class AbstractPropertyValueConverter

    • Constructor Detail

      • AbstractPropertyValueConverter

        protected AbstractPropertyValueConverter()
        Default constructor.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes member variables.

        Default implementation does nothing.
      • handles

        public abstract boolean handles​(Class cls)
        Checks whether this converter handles the particular class.
        Parameters:
        cls - the class to check
        Returns:
        true if it supports it
      • convert

        public abstract Object convert​(Class cls,
                                       String value)
                                throws Exception
        Converts the variable value into the appropriate object, if possible.
        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
      • getConverters

        public static String[] getConverters()
        Returns a list with classnames of converters.
        Returns:
        the converter classnames