Interface Format

    • Method Detail

      • format

        Object format​(TemplateNode location,
                      Object value)
        Will only be called for supported values.
        Parameters:
        location - gives some additional information to this call like the target encoding
        value - will be turned into character data
        Returns:
        value as character data. So either a String, a StringBuilder or EncodedData
      • supports

        boolean supports​(Object value)
        Many formats only apply to a special type or even specific values. The format method will only be called for supported values
      • clear

        void clear​(TemplateNode location)
        Resets the state of the format to initialization value. As most formats are state-less they can safely ignore this method.
        Parameters:
        location - In some cases state is bound to specific nodes