Package com.sun.javadoc

Examples of com.sun.javadoc.PackageDoc


  public static List<String> getFeatures(Doc doc, boolean includingTag, boolean asLink){
    String linkPrefix = null;
    if (asLink){
      ExecutableMemberDoc memberDoc = null;
      ClassDoc classDoc = null;
      PackageDoc packageDoc = null;
      if (doc instanceof ExecutableMemberDoc){
        memberDoc = (ExecutableMemberDoc) doc;
        classDoc = memberDoc.containingClass();
        packageDoc = classDoc.containingPackage();
      }
      if (doc instanceof ClassDoc){
        classDoc = (ClassDoc) doc;
        packageDoc = classDoc.containingPackage();
      }

      if (packageDoc != null){
        linkPrefix = "{@linkplain " + packageDoc.name() + "." + classDoc.name();
        if (memberDoc != null)
          linkPrefix += "#" + memberDoc.name() +memberDoc.flatSignature() + " ";
      }
    }
    List<String> result = TextBoostUtils.getTextBetween(doc.commentText(),
View Full Code Here


        if (! this.isIncluded) {
          boolean inclusionRequired = false;
          if (doc instanceof PackageDoc) {
            // nested nodes are classes, therefore check, if the
            // package contains any classes to be documented
            PackageDoc pd = (PackageDoc) dynamicProxyInstance();
            inclusionRequired = pd.allClasses().length > 0;
          } else if (doc instanceof ClassDoc) {
            // nested nodes are constructors, methods or fields.
            ClassDoc cd = (ClassDoc) dynamicProxyInstance();
            inclusionRequired =
              cd.constructors().length > 0 ||
View Full Code Here

  private String getExportedName(ClassDoc clz) {
    if (clz == null) {
      return "";
    }

    PackageDoc cpkg = clz.containingPackage();
    String pkg = cpkg == null ? "" : (cpkg.name() + ".");
    String name = clz.name();

    for (AnnotationDesc a : clz.annotations()) {
      if (a.annotationType().name().equals("ExportPackage")) {
        for (AnnotationDesc.ElementValuePair p : a.elementValues()) {
View Full Code Here

  private String getExportedPackage(ClassDoc clz) {
    if (clz == null) {
      return "";
    }

    PackageDoc cpkg = clz.containingPackage();
    String pkg = cpkg == null ? "" : (cpkg.name());

    for (AnnotationDesc a : clz.annotations()) {
      if (a.annotationType().name().equals("ExportPackage")) {
        for (AnnotationDesc.ElementValuePair p : a.elementValues()) {
          pkg = p.value().toString();
View Full Code Here

     */
    private static void generatePackageDiagrams(RootDoc root, Options opt, String outputFolder)
      throws IOException {
  Set<String> packages = new HashSet<String>();
  for (ClassDoc classDoc : root.classes()) {
      PackageDoc packageDoc = classDoc.containingPackage();
      if(!packages.contains(packageDoc.name())) {
    packages.add(packageDoc.name());
          OptionProvider view = new PackageView(outputFolder, packageDoc, root, opt);
          UmlGraph.buildGraph(root, view, packageDoc);
          runGraphviz(opt.dotExecutable, outputFolder, packageDoc.name(), packageDoc.name(), root);
          alterHtmlDocs(opt, outputFolder, packageDoc.name(), packageDoc.name(),
            "package-summary.html", Pattern.compile("(</[Hh]2>)|(<h1 title=\"Package\").*"), root);
      }
  }
    }
View Full Code Here

     */
    private static void generatePackageDiagrams(RootDoc root, Options opt, String outputFolder)
      throws IOException {
  Set<String> packages = new HashSet<String>();
  for (ClassDoc classDoc : root.classes()) {
      PackageDoc packageDoc = classDoc.containingPackage();
      if(!packages.contains(packageDoc.name())) {
    packages.add(packageDoc.name());
          OptionProvider view = new PackageView(outputFolder, packageDoc, root, opt);
          UmlGraph.buildGraph(root, view, packageDoc);
          runGraphviz(outputFolder, packageDoc.name(), packageDoc.name(), root);
          alterHtmlDocs(outputFolder, packageDoc.name(), packageDoc.name(),
            "package-summary.html", Pattern.compile("</H2>"), root);
      }
  }
    }
View Full Code Here

     *
     * @param doc the Javadoc model for the given class.
     * @return The (string) class name of the given class.
     */
    protected static String getClassName(ProgramElementDoc doc) {
        PackageDoc containingPackage = doc.containingPackage();
        return containingPackage.name().length() > 0 ?
                String.format("%s.%s", containingPackage.name(), doc.name()) :
                String.format("%s", doc.name());
    }
View Full Code Here

      FieldDoc docInstance = (FieldDoc) doc;
     
    }
    else if (doc instanceof PackageDoc)
    {
      PackageDoc docInstance = (PackageDoc) doc;
    }
    else
    {
      throw new IllegalStateException();
    }
View Full Code Here

      FieldDoc docInstance = (FieldDoc) doc;
     
    }
    else if (doc instanceof PackageDoc)
    {
      PackageDoc docInstance = (PackageDoc) doc;
      ClassDoc[] classes = docInstance.allClasses();
      Arrays.sort(classes);
      addChildDocs(classes );
    }
    else
    {
View Full Code Here

      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

TOP

Related Classes of com.sun.javadoc.PackageDoc

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.