Examples of Javadoc


Examples of com.asakusafw.utils.java.model.syntax.Javadoc

     * @return ドキュメンテーション、存在しない場合は空のリスト
     * @throws IllegalArgumentException 引数に{@code null}が指定された場合
     */
    public List<? extends DocElement> getDocument(Element element) {
        Precondition.checkMustNotBeNull(element, "element"); //$NON-NLS-1$
        Javadoc doc = getJavadoc(environment, element);
        return getAbstractBlock(doc);
    }
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.Javadoc

    /**
     * この要素に対するドキュメント(概要のみ)を返す。
     * @return この要素に対するドキュメント、存在しない場合は空のリスト
     */
    public List<? extends DocElement> getExecutableDocument() {
        Javadoc doc = documentation;
        return getAbstractBlock(doc);
    }
View Full Code Here

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

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

* @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

Examples of org.apache.tools.ant.taskdefs.Javadoc

    buildLogger.setMessageOutputLevel(debug ? Project.MSG_DEBUG : Project.MSG_INFO);
    buildLogger.setOutputPrintStream(getContext().out);
    buildLogger.setErrorPrintStream(getContext().err);
    antProject.addBuildListener(buildLogger);
    antProject.setBasedir(ProjectUtils.getPath(project));
    Javadoc javadoc = new Javadoc();
    javadoc.setTaskName("javadoc");
    javadoc.setProject(antProject);
    javadoc.setDestdir(new File(ProjectUtils.getFilePath(project, dest)));
    if (packageNames != null && !packageNames.trim().equals(StringUtils.EMPTY)){
      javadoc.setPackagenames(packageNames);
    }

    // construct classpath
    Path classpath = new Path(antProject);
    String[] paths = ClasspathUtils.getClasspath(javaProject);
    for (String path : paths){
      Path.PathElement pe = classpath.createPathElement();
      pe.setPath(path);
    }
    javadoc.setClasspath(classpath);

    if (files == null){
      // construct sourcepath
      String sourcepath =
        getPreferences().getValue(project, "org.eclim.java.doc.sourcepath");
      if (sourcepath != null && !sourcepath.trim().equals(StringUtils.EMPTY)){
        paths = StringUtils.split(sourcepath, " ");
      }else{
        paths = ClasspathUtils.getSrcPaths(javaProject);
      }
      for (String path : paths){
        FileSet fileset = new FileSet();
        fileset.setProject(antProject);
        fileset.setDir(new File(ProjectUtils.getFilePath(project, path)));
        fileset.setIncludes("**/*.java");
        javadoc.addFileset(fileset);
      }
    }else{
      paths = StringUtils.split(files);
      for (String path : paths){
        javadoc.addSource(
            new Javadoc.SourceFile(
              new File(ProjectUtils.getFilePath(project, path))));
      }
    }

    javadoc.execute();

    return null;
  }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Javadoc

     *
     * @param proj The current Project
     */
    protected void generateXML(ProjectInfo proj) {
  String apiname = proj.getName();
  Javadoc jd = initJavadoc("Analyzing " + apiname);
  jd.setDestdir(getDestdir());
  addSourcePaths(jd, proj);

  // Tell Javadoc which packages we want to scan.
  // JDiff works with packagenames, not sourcefiles.
  jd.setPackagenames(getPackageList(proj));
 
  // Create the DocletInfo first so we have a way to use it to add params
  DocletInfo dInfo = jd.createDoclet();
  jd.setDoclet("jdiff.JDiff");
  jd.setDocletPath(new Path(project, jdiffClassPath));
 
  // Now set up some parameters for the JDiff doclet.
  DocletParam dp1 = dInfo.createParam();
  dp1.setName("-apiname");
  dp1.setValue(apiname);
  DocletParam dp2 = dInfo.createParam();
  dp2.setName("-baseURI");
  dp2.setValue("http://www.w3.org");
  // Put the generated file in the same directory as the report
  DocletParam dp3 = dInfo.createParam();
  dp3.setName("-apidir");
  dp3.setValue(getDestdir().toString());
 
  // Execute the Javadoc command to generate the XML file.
  jd.perform();
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Javadoc

        });
    }
   
    @SuppressWarnings("unchecked")
    protected boolean isDeprecated(MethodDeclaration method) {
        Javadoc doc = method.getJavadoc();
        if (doc != null) {
            Iterator<TagElement> elements = doc.tags().iterator();
            while (elements.hasNext()) {
                TagElement element = elements.next();
                if (element.getTagName() != null && element.getTagName().equals(TagElement.TAG_DEPRECATED)) {
                    return true;
                }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Javadoc

     *
     * @param text comment text
     */
    public void addSourceComment(String text) {
        if (m_class instanceof AbstractTypeDeclaration) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(text);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            ((AbstractTypeDeclaration)m_class).setJavadoc(javadoc);
        } else {
            throw new IllegalStateException("Internal error - cannot add JavaDoc to non-class type");
        }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Javadoc

     * @param doc documentation text, or <code>null</code> if none
     * @param decl
     */
    public void addJavaDoc(String doc, BodyDeclaration decl) {
        if (doc != null) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(doc);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            decl.setJavadoc(javadoc);
        }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Javadoc

            TextElement element = ast.newTextElement();
            element.setText(text);
            TagElement tag = ast.newTagElement();
            tag.setTagName(name);
            tag.fragments().add(element);
            Javadoc javadoc = m_declaration.getJavadoc();
            if (javadoc == null) {
                javadoc = ast.newJavadoc();
                m_declaration.setJavadoc(javadoc);
            }
            javadoc.tags().add(tag);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.