/** * {@inheritDoc} This implementation checks whether the object to be escaped * is a string. If yes, it delegates to {@link #escapeString(String)}, * otherwise no escaping is performed. Eventually, the passed in transformer * is invoked so that additional encoding can be performed. */ @Override public Object escape(final Object value, final ValueTransformer transformer) { final Object escValue = (value instanceof String) ? escapeString((String) value) : value; return transformer.transformValue(escValue); }