Package com.sun.javadoc

Examples of com.sun.javadoc.RootDoc


  }
   
  @Test
  public void testGetFieldComment() throws Exception{
   
    RootDoc doc =  createDefaultRootDoc();
    String comment = null;
    for (ClassDoc classDoc: doc.classes()){
      if (classDoc.name().equals("SampleClass")){
        comment = DocUtils.getFieldComment(classDoc, "textproperty", true);
       
      }
    }
View Full Code Here


    Assert.assertNotNull(comment);
  }
 
  @Test
  public void testCreateJavadocOfFile() throws Exception{
    RootDoc doc =  createDefaultRootDoc();
    String comment = null;
    for (ClassDoc classDoc: doc.classes()){
        RootDoc rootDoc = DocUtils.createJavadocOfFile(new ClassDocDelegate(classDoc).getSourcefile());
        Assert.assertNotNull(rootDoc);
       
    }
  }
View Full Code Here

  }
 
  @Test
  public void testMergeComment() throws Exception{
   
    RootDoc doc =  createDefaultRootDoc();
    String comment = "added text";
    for (ClassDoc classDoc: doc.classes()){
      for (MethodDoc methodDoc: classDoc.methods()){
         DocUtils.mergeComment(methodDoc, comment,true, (String[])null);
      }
       
    }
View Full Code Here

  @Test
  @Example(clasz=JavadocCompletenessTester.class)
  public void example() throws Exception{
    //[gb:useInDocumentation]
    //get some rootDoc
    RootDoc rootDoc = createDefaultRootDoc();
    StringWriter report = new StringWriter();
    JavadocCompletenessTester.createReport(rootDoc, report);
    //[/gb:useInDocumentation]
    getLog().trace(report);
  }
View Full Code Here

     
      JavadocTool javadocTool = JavadocTool.make0(context);
    // javadocTool.verbose = true;
    // javadocTool.encoding = encoding;

    RootDoc rootDoc = javadocTool.getRootDocImpl("", encoding,
                    new ModifierFilter(ModifierFilter.ALL_ACCESS),
                    javaNames.toList(),
                    optionList.toList(),
                    false,
                    subPackages.toList(),
View Full Code Here

   */
  public static ClassDoc getFullClassDoc(ClassDoc doc) throws Exception{
    Check.notNull(doc, "doc");
    File sourcefile = new ClassDocDelegate(doc).getSourcefile();
    Check.isTrue(sourcefile.exists(), "The file does not exist ", sourcefile);
    RootDoc fullRootDoc = DocBoostUtils.createJavadocOfFile(sourcefile);
    Check.notNull(fullRootDoc, "fullRootDoc", "should be created from file " + sourcefile);
    ClassDoc fullClassDoc = fullRootDoc.classNamed(doc.qualifiedName());
    return fullClassDoc;
  }
View Full Code Here

    for (Object container : docEnvContainer) {
      replaceMessager(container, newMessager);

      if (container instanceof RootDoc) {
        RootDoc doc = (RootDoc) container;
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.classes());
      }

      if (container instanceof ProgramElementDoc) {
        ProgramElementDoc doc = (ProgramElementDoc) container;
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.annotations());
      }

      if (container instanceof ClassDoc) {
        ClassDoc doc = (ClassDoc) container;
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.constructors());
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.methods());
        replaceMessagerRecursively(newMessager, (Object[]) doc.fields());
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.innerClasses());
      }
    }

  }
View Full Code Here

      e.printStackTrace();
      root.printError(e.toString());
      return false;
    }
        fd.setErrorReporter(root);
        RootDoc filteredRootDoc = (RootDoc) HalfDynamicProxy.getHDPProxy(root, RootDoc.class, HalfDynamicProxy.stateFactory(fd,fd));
        fd.preDelegateStartHook(filteredRootDoc);
        return ((Boolean) delegateDocletInvoke("start", new Object[]{ filteredRootDoc })).booleanValue();
    }
View Full Code Here

  {
    if (field == null)
    {
    if (doc instanceof RootDoc)
    {
      RootDoc docInstance = (RootDoc) doc;
      return "Javadoc";
    }
    else if (doc instanceof AnnotationTypeDoc)
    {
      AnnotationTypeDoc docInstance = (AnnotationTypeDoc) doc;
      return "AnnotationType " + docInstance.name();
    }
    else if (doc instanceof AnnotationTypeElementDoc)//is subinterface of method so it must com before the MethodDoc
    {
      AnnotationTypeElementDoc docInstance = (AnnotationTypeElementDoc) doc;
      return "AnnotationTypeElement " + docInstance.name();
    }
    else if (doc instanceof MethodDoc)
    {
      MethodDoc docInstance = (MethodDoc) doc;
      return "Method " + docInstance.name();
    }
    else if (doc instanceof ClassDoc)
    {
      ClassDoc docInstance = (ClassDoc) doc;
      return "Class " + docInstance.name();
    }
    else if (doc instanceof ConstructorDoc)
    {
      ConstructorDoc docInstance = (ConstructorDoc) doc;
      return "Constructor " + docInstance.name();
    }
    else if (doc instanceof FieldDoc)
    {
      FieldDoc docInstance = (FieldDoc) doc;
      return "Field " + docInstance.name();
    }
    else if (doc instanceof PackageDoc)
    {
      PackageDoc docInstance = (PackageDoc) doc;
      return "Package " + docInstance.name();
    }
    else
    {
      return  doc.getClass().getName();
    }
View Full Code Here

    for (Tag tag: doc.tags())
      children.add( new DocTreeNode(this, doc, tag));
   
    if (doc instanceof RootDoc)
    {
      RootDoc docInstance = (RootDoc) doc;
    }
    else if (doc instanceof AnnotationTypeDoc)
    {
      AnnotationTypeDoc docInstance = (AnnotationTypeDoc) doc;
     
View Full Code Here

TOP

Related Classes of com.sun.javadoc.RootDoc

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.