com.ibm.ffdc.config

Interface Formatter


  1. public interface Formatter
Formatters are helpers capable to format other objects for FFDC purposes. Formatters can be registered dynamically with FFDC. A formatter can provide formatting for instances of one ore more types, or classes.

Method Summary

Modifier and Type Method and Description
  1. void
formatTo(java.lang.Object objectToFormat,IncidentStream incidentStream)
Write the submitted object to format on the submitted incident stream
  1. java.lang.String[]
getSupportedTypeNames()
Return the supported type names.
  1. boolean
isSupported(java.lang.Class<?> clazz)
Check if the submitted type is supported

Method Detail

formatTo

  1. void formatTo(java.lang.Object objectToFormat,
  2. IncidentStream incidentStream)
  3. throws java.lang.IllegalArgumentException
Write the submitted object to format on the submitted incident stream
Parameters:
objectToFormat -
incidentStream -
Throws:
java.lang.IllegalArgumentException

getSupportedTypeNames

  1. java.lang.String[] getSupportedTypeNames( )
Return the supported type names. Wildcarding is supported as follows.

  • "somepackage.*" will format all types within the package somepackage
  • "somepackage.A" will format the specified type only

    Package/subpackage wildcarding is not supported.

    Implementors must avoid loading the classes corresponding the names.

  • Returns:
    the supported type names this formatter can format

    isSupported

    1. boolean isSupported(java.lang.Class<?> clazz)
    Check if the submitted type is supported
    Parameters:
    clazz - the type to be checked
    Returns:
    true if clazz is supported, false otherwise