Interface ObjectRenderer

All Superinterfaces:
PluginFeature

public interface ObjectRenderer extends PluginFeature

Allows plugins to define custom 'toString' rules for generating a localized string representation of an object, in addition to the defaults.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canRender(Object object)
     
    render(Messages messages, Object object, Locale locale)
    Generate a localized string for an object
  • Method Details

    • canRender

      boolean canRender(Object object)
      Returns:
      true if this object renderer can and is meant to print out the given object
    • render

      String render(Messages messages, Object object, Locale locale)

      Generate a localized string for an object

      Parameters:
      messages - the i18n subsystem - used for looking up MessageSources
      object - the object to turn in to a string
      locale - the locale to print it out in
      Returns:
      a string, or null if it couldn't be translated.