public String summary() { return SimpleGroovyDoc.calculateFirstSentence(description); }
public void setRawCommentText(String rawCommentText) { this.rawCommentText = rawCommentText; calculateTags(rawCommentText); }
public String getTypeDescription() { if (isInterface()) return "Interface"; if (isTrait()) return "Trait"; if (isAnnotationType()) return "Annotation Type"; if (isEnum()) return "Enum"; return "Class"; }
public String getTypeSourceDescription() { if (isInterface()) return "interface"; if (isAnnotationType()) return "@interface"; if (isEnum()) return "enum"; return "class"; }
public void setRawCommentText(String rawCommentText) { this.rawCommentText = rawCommentText; setFirstSentenceCommentText(calculateFirstSentence(rawCommentText)); calculateTags(rawCommentText); }
private void calculateTags(String rawCommentText) { String trimmed = rawCommentText.replaceFirst("(?s).*?\\*\\s*@", "@"); if (trimmed.equals(rawCommentText)) return; String cleaned = trimmed.replaceAll("(?m)^\\s*\\*\\s*([^*]*)$", "$1").trim(); String[] split = cleaned.split("(?m)^@"); List<GroovyTag> result = new ArrayList<GroovyTag>(); for (String s : split) { String tagname = null; if (s.startsWith("param") || s.startsWith("throws")) { Matcher m = TAG3_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, m.group(2), m.group(3))); } } else { Matcher m = TAG2_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, null, m.group(2))); } } if ("deprecated".equals(tagname)) { setDeprecated(true); } } tags = result.toArray(new GroovyTag[result.size()]); }
public String getTypeDescription() { if (isInterface()) return "Interface"; if (isAnnotationType()) return "Annotation Type"; if (isEnum()) return "Enum"; return "Class"; }
private void calculateTags(String rawCommentText) { String trimmed = rawCommentText.replaceFirst("(?s).*?\\*\\s*@", "@"); if (trimmed.equals(rawCommentText)) return; String cleaned = trimmed.replaceAll("(?m)^\\s*\\*\\s*([^*]*)$", "$1").trim(); String[] split = cleaned.split("(?m)^@"); List<GroovyTag> result = new ArrayList<GroovyTag>(); for (String s : split) { String tagname = null; if (s.startsWith("param") || s.startsWith("throws")) { Matcher m = TAG3_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, m.group(2), m.group(3))); } } else { Matcher m = TAG2_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, null, m.group(2))); } } if ("deprecated".equals(tagname)) { setDeprecated(true); } } tags = result.toArray(new GroovyTag[result.size()]); }
public String getTypeSourceDescription() { if (isInterface()) return "interface"; if (isAnnotationType()) return "@interface"; if (isEnum()) return "enum"; return "class"; }
public String getTypeSourceDescription() { if (isInterface()) return "interface"; if (isTrait()) return "trait"; if (isAnnotationType()) return "@interface"; if (isEnum()) return "enum"; return "class"; }
private void calcThenSetSummary(String src, SimpleGroovyPackageDoc packageDoc) { packageDoc.setSummary(SimpleGroovyDoc.calculateFirstSentence(src)); }
private void calculateTags(String rawCommentText) { String trimmed = rawCommentText.replaceFirst("(?s).*?\\*\\s*@", "@"); if (trimmed.equals(rawCommentText)) return; String cleaned = trimmed.replaceAll("(?m)^\\s*\\*\\s*([^*]*)$", "$1").trim(); String[] split = cleaned.split("(?m)^@"); List<GroovyTag> result = new ArrayList<GroovyTag>(); for (String s : split) { String tagname = null; if (s.startsWith("param") || s.startsWith("throws")) { Matcher m = TAG3_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, m.group(2), m.group(3))); } } else { Matcher m = TAG2_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, null, m.group(2))); } } if ("deprecated".equals(tagname)) { setDeprecated(true); } } tags = result.toArray(new GroovyTag[result.size()]); }
public void setRawCommentText(String rawCommentText) { this.rawCommentText = rawCommentText; calculateTags(rawCommentText); }
public String getTypeSourceDescription() { if (isInterface()) return "interface"; if (isAnnotationType()) return "@interface"; if (isEnum()) return "enum"; return "class"; }
public String getTypeSourceDescription() { if (isInterface()) return "interface"; if (isTrait()) return "trait"; if (isAnnotationType()) return "@interface"; if (isEnum()) return "enum"; return "class"; }
public String summary() { return SimpleGroovyDoc.calculateFirstSentence(description); }
private void calculateTags(String rawCommentText) { String trimmed = RAW_COMMENT_PATTERN.matcher(rawCommentText).replaceFirst("@"); if (trimmed.equals(rawCommentText)) return; String cleaned = TRIMMED_COMMENT_PATTERN.matcher(trimmed).replaceAll("$1").trim(); String[] split = cleaned.split("(?m)^@"); List<GroovyTag> result = new ArrayList<GroovyTag>(); for (String s : split) { String tagname = null; if (s.startsWith("param") || s.startsWith("throws")) { Matcher m = TAG3_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, m.group(2), m.group(3))); } } else { Matcher m = TAG2_PATTERN.matcher(s); if (m.find()) { tagname = m.group(1); result.add(new SimpleGroovyTag(tagname, null, m.group(2))); } } if ("deprecated".equals(tagname)) { setDeprecated(true); } } tags = result.toArray(EMPTY_GROOVYTAG_ARRAY); }
public void setRawCommentText(String rawCommentText) { this.rawCommentText = rawCommentText; calculateTags(rawCommentText); }
public String getTypeDescription() { if (isInterface()) return "Interface"; if (isAnnotationType()) return "Annotation Type"; if (isEnum()) return "Enum"; return "Class"; }
public String getTypeDescription() { if (isInterface()) return "Interface"; if (isTrait()) return "Trait"; if (isAnnotationType()) return "Annotation Type"; if (isEnum()) return "Enum"; if (isScript()) return "Script"; return "Class"; }