Package net.sf.jelly.apt.decorations

Examples of net.sf.jelly.apt.decorations.JavaDoc


  private void gatherDocumentationGroupFacets(Declaration decl, Set<Facet> facets) {
    if (decl != null) {
      DocumentationGroup documentationGroup = decl.getAnnotation(DocumentationGroup.class);
      if (documentationGroup != null) {
        for (String name : documentationGroup.value()) {
          facets.add(new Facet(DocumentationGroup.class.getName(), name, new JavaDoc(decl.getDocComment()).toString()));
        }
      }
      else if (decl instanceof TypeDeclaration) {
        PackageDeclaration pkg = ((TypeDeclaration)decl).getPackage();
        if (pkg != null) {
          documentationGroup = pkg.getAnnotation(DocumentationGroup.class);
          if (documentationGroup != null) {
            for (String name : documentationGroup.value()) {
              facets.add(new Facet(DocumentationGroup.class.getName(), name, new JavaDoc(pkg.getDocComment()).toString()));
            }
          }
        }
      }
    }
View Full Code Here


* @author Ryan Heaton
*/
public class TestThrowsComments extends TestCase {

  public void testThrowsOnNewLine() throws Exception {
    JavaDoc jd = new JavaDoc("Reads a set of persons from the database.  Intended as an example of\n" +
                  "collections as SOAP parameters.\n" +
                  "@param personIds The ids of the persons to read.\n" +
                  "@return The persons that were read.\n" +
                  "@throws ServiceException\n" +
                  "If the read of one or more of the people failed.");
    String throwsDoc = jd.get("throws").toString();
    assertEquals("ServiceException\n" +
      "If the read of one or more of the people failed.", throwsDoc);

    int spaceIndex = throwsDoc.indexOf(' ');
    if (spaceIndex == -1) {
View Full Code Here

TOP

Related Classes of net.sf.jelly.apt.decorations.JavaDoc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.