@Test void convertToDocumentReference() { assertEquals(this.documentReference, documentConverter.convert(DocumentReference.class, xWikiDocument)); }
@Override public <G> G convert(Type targetType, Object sourceValue) { if (sourceValue == null) { return null; } if (sourceValue instanceof XWikiDocument) { return convertFromType(targetType, sourceValue); } else { return super.convert(targetType, sourceValue); } }
XWikiDocumentConverter extends AbstractConverter<XWikiDocument> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (sourceValue == null) { return null; } if (sourceValue instanceof XWikiDocument) { return convertFromType(targetType, sourceValue); } else { return super.convert(targetType, sourceValue); } } }
XWikiDocumentConverter extends AbstractConverter<XWikiDocument> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (sourceValue == null) { return null; } if (sourceValue instanceof XWikiDocument) { return convertFromType(targetType, sourceValue); } else { return super.convert(targetType, sourceValue); } }  }
XWikiDocumentConverter extends AbstractConverter<XWikiDocument> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (sourceValue == null) { return null; } if (sourceValue instanceof XWikiDocument) { return convertFromType(targetType, sourceValue); } else { return super.convert(targetType, sourceValue); } }  @Override G convert(Type targetType, Object sourceValue); @Override XWikiDocument convertToType(Type targetType, Object sourceValue); }
XWikiDocumentConverter extends AbstractConverter<XWikiDocument> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (sourceValue == null) { return null; } if (sourceValue instanceof XWikiDocument) { return convertFromType(targetType, sourceValue); } else { return super.convert(targetType, sourceValue); } }  @Override G convert(Type targetType, Object sourceValue); @Override XWikiDocument convertToType(Type targetType, Object sourceValue);  }