/** * Handles all the semantic tokens of the JavaDoc. * * @param section The section name (null for main description). * @param value The value. * @param handler The handler. * @param context The context of the tags. * @return The replacement value. */ private String resolveJavaDocSemantics(String section, String value, JavaDocTagHandler handler, DecoratedElement context) { //first pass through the inline tags... StringBuilder builder = new StringBuilder(); Matcher matcher = INLINE_TAG_PATTERN.matcher(value); int lastStart = 0; while (matcher.find()) { builder.append(value.substring(lastStart, matcher.start())); String replacement = handler.onInlineTag(matcher.group(1), matcher.group(2), context); if (replacement != null) { builder.append(replacement); } else { builder.append(value.substring(matcher.start(), matcher.end())); } lastStart = matcher.end(); } builder.append(value.substring(lastStart, value.length())); return handler.onBlockTag(section, builder.toString(), context); }
/** * Handles all the semantic tokens of the JavaDoc. * * @param section The section name (null for main description). * @param value The value. * @param handler The handler. * @param context The context of the tags. * @return The replacement value. */ private String resolveJavaDocSemantics(String section, String value, JavaDocTagHandler handler, DecoratedElement context) { //first pass through the inline tags... StringBuilder builder = new StringBuilder(); Matcher matcher = INLINE_TAG_PATTERN.matcher(value); int lastStart = 0; while (matcher.find()) { builder.append(value.substring(lastStart, matcher.start())); String replacement = handler.onInlineTag(matcher.group(1), matcher.group(2), context); if (replacement != null) { builder.append(replacement); } else { builder.append(value.substring(matcher.start(), matcher.end())); } lastStart = matcher.end(); } builder.append(value.substring(lastStart, value.length())); return handler.onBlockTag(section, builder.toString(), context); }