if( property == null )
{
return;
}
final Documentation docAnnotation = property.getAnnotation( Documentation.class );
if( docAnnotation == null || docAnnotation.mergeStrategy() != DocumentationMergeStrategy.REPLACE )
{
init( property.getBase(), content, topics );
}
if( docAnnotation != null )
{
final LocalizationService localization = property.getLocalizationService();
final DocumentationMergeStrategy docMergeStrategy = docAnnotation.mergeStrategy();
final String docAnnotationContent = localization.text( docAnnotation.content().trim(), CapitalizationType.NO_CAPS, false );
if( docAnnotationContent.length() > 0 )
{
if( docMergeStrategy == DocumentationMergeStrategy.REPLACE || content.length() == 0 )
{
content.append( docAnnotationContent );
}
else if( docMergeStrategy == DocumentationMergeStrategy.APPEND )
{
content.append( PARAGRAPH_BREAK );
content.append( docAnnotationContent );
}
else
{
content.insert( 0, PARAGRAPH_BREAK );
content.insert( 0, docAnnotationContent );
}
}
final List<Topic> docAnnotationTopics = convert( docAnnotation.topics(), localization );
if( ! docAnnotationTopics.isEmpty() )
{
if( docMergeStrategy != DocumentationMergeStrategy.PREPEND || topics.isEmpty() )
{