}
public void writeTo(JsonGenerator generator, MessageLite owner, String fieldName) throws IOException
{
MessageLite message;
try
{
message = (MessageLite)_messagePropertyAccessor.getValue(owner);
if(message==null)
return;
}
catch (IllegalArgumentException e)
{
throw new RuntimeException(e);
}
catch (IllegalAccessException e)
{
throw new RuntimeException(e);
}
catch (InvocationTargetException e)
{
if(e.getCause() instanceof IOException)
throw (IOException)e.getCause();
throw new IOException(e);
}
ReflectionConvertor convertor = _convertor._lite.get(_messagePropertyAccessor.getTypeClass());
if(convertor==null)
throw new IOException("Message not included: " + message.getClass());
generator.writeFieldName(fieldName);
convertor.generateTo(generator, message);
}