Interface Transformer

    • Method Detail

      • transform

        Object transform​(Object o,
                         TransformerContext ctx)
                  throws Exception
        The main method of the Transformer interface. This method takes the object to be transformed and returns an appropriate converted representation of it. The also passed in TransformerContext object can be used to access system information that may be needed for generating the transformed representation, e.g. the actual Locale.
        Parameters:
        o - the object to be transformed
        ctx - the TransformerContext object
        Returns:
        the transformed instance
        Throws:
        Exception - Transformers can throw arbitrary exceptions if the conversion is not possible