public void putAll(Map<String, GroovyClassDoc> classes) { // 2 way relationship for visible classes: // add reference to classes inside this package // add reference to this package inside classes for (Map.Entry<String, GroovyClassDoc> docEntry : classes.entrySet()) { final GroovyClassDoc classDoc = docEntry.getValue(); classDocs.put(docEntry.getKey(), classDoc); SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc) classDoc; programElement.setContainingPackage(this); } }
private void addAnnotationRef(SimpleGroovyProgramElementDoc node, GroovySourceAST t) { GroovySourceAST classNode = t.childOfType(IDENT); if (classNode != null) { node.addAnnotationRef(new SimpleGroovyAnnotationRef(extractName(classNode), getChildTextFromSource(t).trim())); } }
private void processModifiers(GroovySourceAST t,SimpleGroovyProgramElementDoc programElementDoc) { GroovySourceAST modifiers = t.childOfType(GroovyTokenTypes.MODIFIERS); if (modifiers != null) { AST currentModifier = modifiers.getFirstChild(); boolean seenNonPublicVisibilityModifier = false; while (currentModifier != null) { int type = currentModifier.getType(); switch (type) { case GroovyTokenTypes.LITERAL_protected: case GroovyTokenTypes.LITERAL_private: seenNonPublicVisibilityModifier = true; break; case GroovyTokenTypes.LITERAL_static: programElementDoc.setStatic(true); break; } currentModifier = currentModifier.getNextSibling(); } if (!seenNonPublicVisibilityModifier) { // in groovy (and java asts turned into groovy by Groovifier), methods are assumed public, unless informed otherwise programElementDoc.setPublic(true); } } }
public void setRawCommentText(String rawCommentText) { super.setRawCommentText(rawCommentText); setCommentText(((SimpleGroovyClassDoc)belongsToClass).replaceTags(rawCommentText)); } }
public String commentText() { if (super.commentText() == null) setCommentText(replaceTags(getRawCommentText())); return super.commentText(); }
public String firstSentenceCommentText() { if (super.firstSentenceCommentText() == null) setFirstSentenceCommentText(replaceTags(calculateFirstSentence(getRawCommentText()))); return super.firstSentenceCommentText(); }
public void setRawCommentText(String rawCommentText) { super.setRawCommentText(rawCommentText); setCommentText(replaceTags(rawCommentText)); }
public String commentText() { if (super.commentText() == null) { SimpleGroovyClassDoc classDoc = (SimpleGroovyClassDoc) belongsToClass; setCommentText(classDoc.replaceTags(getRawCommentText())); } return super.commentText(); }
public String firstSentenceCommentText() { if (super.firstSentenceCommentText() == null) { SimpleGroovyClassDoc classDoc = (SimpleGroovyClassDoc) belongsToClass; setFirstSentenceCommentText(classDoc.replaceTags(calculateFirstSentence(getRawCommentText()))); } return super.firstSentenceCommentText(); }
public void putAll(Map<String, GroovyClassDoc> classes) { // 2 way relationship // add reference to classes inside this package classDocs.putAll(classes); // add reference to this package inside classes for (GroovyClassDoc doc : classes.values()) { SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc) doc; programElement.setContainingPackage(this); } }
private void addAnnotationRef(SimpleGroovyProgramElementDoc node, GroovySourceAST t) { GroovySourceAST classNode = getPackageDotType(t); if (classNode != null) { node.addAnnotationRef(new SimpleGroovyAnnotationRef(extractName(classNode), getChildTextFromSource(t).trim())); } }
public void putAll(Map<String, GroovyClassDoc> classes) { // 2 way relationship // add reference to classes inside this package classDocs.putAll(classes); // add reference to this package inside classes for (GroovyClassDoc doc : classes.values()) { SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc) doc; programElement.setContainingPackage(this); } }
private void addAnnotationRef(SimpleGroovyProgramElementDoc node, GroovySourceAST t) { GroovySourceAST classNode = t.childOfType(IDENT); if (classNode != null) { node.addAnnotationRef(new SimpleGroovyAnnotationRef(extractName(classNode), getChildTextFromSource(t).trim())); } }
public void putAll(Map<String, GroovyClassDoc> classes) { // 2 way relationship for visible classes: // add reference to classes inside this package // add reference to this package inside classes for (Map.Entry<String, GroovyClassDoc> docEntry : classes.entrySet()) { final GroovyClassDoc classDoc = docEntry.getValue(); classDocs.put(docEntry.getKey(), classDoc); SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc) classDoc; programElement.setContainingPackage(this); } }
private void addAnnotationRef(SimpleGroovyProgramElementDoc node, GroovySourceAST t) { GroovySourceAST classNode = t.childOfType(IDENT); if (classNode != null) { node.addAnnotationRef(new SimpleGroovyAnnotationRef(extractName(classNode), getChildTextFromSource(t).trim())); } }
public void putAll(Map classes) { // 2 way relationship // add reference to classes inside this package classDocs.putAll(classes); // add reference to this package inside classes Iterator itr = classes.values().iterator(); while (itr.hasNext()) { SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc)itr.next(); programElement.setContainingPackage(this); } } public String nameWithDots() {
private void addAnnotationRef(SimpleGroovyProgramElementDoc node, GroovySourceAST t) { GroovySourceAST classNode = t.childOfType(IDENT); if (classNode != null) { node.addAnnotationRef(new SimpleGroovyAnnotationRef(extractName(classNode), getChildTextFromSource(t).trim())); } }
public void putAll(Map<String, GroovyClassDoc> classes) { // 2 way relationship for visible classes: // add reference to classes inside this package // add reference to this package inside classes for (Map.Entry<String, GroovyClassDoc> docEntry : classes.entrySet()) { final GroovyClassDoc classDoc = docEntry.getValue(); classDocs.put(docEntry.getKey(), classDoc); SimpleGroovyProgramElementDoc programElement = (SimpleGroovyProgramElementDoc) classDoc; programElement.setContainingPackage(this); } }