de.smartics.properties.utils
Class JavadocCommentHelper

Package class diagram package JavadocCommentHelper
java.lang.Object
  extended by de.smartics.properties.utils.JavadocCommentHelper

public final class JavadocCommentHelper
     
     
extends Object

Utilities to normalize Javadoc comments.


Constructor Summary
JavadocCommentHelper(String prefix1, String suffix1, String prefix2, String suffix2)
          Default constructor.
 
Method Summary
static JavadocCommentHelper createHtml()
          Creates a default helper for normalizing in an HTML context.
static JavadocCommentHelper createText()
          Creates a default helper for normalizing in text context.
 String expandFirstBlock(String fragment)
          Usually the first paragraph in a Javadoc comment is not tagged as a paragraph to reduce the markup.
 String replaceJavadocInlines(String fragment)
          Replaces Javadoc inline tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavadocCommentHelper

public JavadocCommentHelper(String prefix1,
                            String suffix1,
                            String prefix2,
                            String suffix2)
Default constructor.

Parameters:
prefix1 - the prefix for group 1 match.
suffix1 - the suffix for group 1 match.
prefix2 - the prefix for group 2 match.
suffix2 - the suffix for group 2 match.
Method Detail

createHtml

public static JavadocCommentHelper createHtml()
Creates a default helper for normalizing in an HTML context.

Returns:
the HTML version of the helper.

createText

public static JavadocCommentHelper createText()
Creates a default helper for normalizing in text context.

Returns:
the text version of the helper.

expandFirstBlock

public String expandFirstBlock(String fragment)
Usually the first paragraph in a Javadoc comment is not tagged as a paragraph to reduce the markup. This helper probes if the block tag is present and if not adds it.

Parameters:
fragment - the javadoc fragment to check.
Returns:
the cleaned fragment.

replaceJavadocInlines

public String replaceJavadocInlines(String fragment)
Replaces Javadoc inline tags.

Parameters:
fragment - the fragment with inline tags.
Returns:
the normalized fragment.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.