public static String extractDescription ( JavadocComment jdoc ) { String content = jdoc . getContent ( ) . replaceAll ( "\n[ \t]+\\* ?" , "\n" ) ; //remove the * at the beginning of a line int end = content . indexOf ( "\n@" ) ; //look for the first annotation //The first charater is always a new line if ( end > 0 ) { return content . substring ( 1 , end ) . trim ( ) ; } return content . substring ( 1 ) . trim ( ) ; }
Get a text description from JavaDoc block comment .