Package com.sun.javadoc

Examples of com.sun.javadoc.ClassDoc


     * @param root the RootDoc passed to the doclet
     * @return the FieldDoc of the factory field inherited from extended interface
     *         or null if no factory field found
     */
    public static FieldDoc getFactoryField(ClassDoc classDoc, RootDoc root) {
        ClassDoc ComponentFactory = root.classNamed(TEST_API_KERNEL_PACKAGE + ".ComponentFactory");
        for (ClassDoc interface_ : classDoc.interfaces()) {
            if (isTestAPI(interface_, root)) {
                for (FieldDoc field : interface_.fields()) {
                    if (field.name().equals("factory")) {
                        ClassDoc fieldClassDoc = field.type().asClassDoc();
                        if ((fieldClassDoc != null) && fieldClassDoc.subclassOf(ComponentFactory)) {
                            return field;
                        }
                    }
                }
            }
View Full Code Here


        ClassDoc[] classes = root.classes();
        sortClassesAlphabetically(classes);

        ArrayList<ClassDoc> verbsList = new ArrayList<ClassDoc>(classes.length);
        for (int i = 0; i < classes.length; i++) {
            ClassDoc classDoc = classes[i];
            if (isTestAPI(classDoc, root)) {
                // Exclude factory classes (MultipleInstancesComponent, SingletonComponent, ...)
                if (!classDoc.qualifiedTypeName().startsWith(TEST_API_KERNEL_PACKAGE)) {
                    verbsList.add(classDoc);
                }
            }
        }
View Full Code Here

                String error = "Invalid " + tag.name() + " tag format \"" + text + "\" for ";
                if (tag.holder() instanceof MethodDoc) {
                    MethodDoc methodDoc = (MethodDoc) tag.holder();
                    error += "verb " + methodDoc.name() + " of component " + methodDoc.containingClass().simpleTypeName();
                } else if (tag.holder() instanceof ClassDoc) {
                    ClassDoc classDoc = (ClassDoc) tag.holder();
                    error += "component " + classDoc.simpleTypeName();
                } else {
                    error += "unknown Doc type";
                }
                System.err.println(error);
                nameTypeDescriptionList.add(new NameTypeDescription(text, "INVALID_FORMAT", "INVALID_FORMAT"));
View Full Code Here

    public void printTestAPIComponentsSummary(ClassDoc[] testAPIComponents) {
        mOut.println("<P>");
        mOut.println("<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">");
        mOut.println("<TR BGCOLOR=\"#CCCCFF\"><TH ALIGN=\"left\" COLSPAN=\"2\"><FONT SIZE=\"+2\"><B>Components Summary</B></FONT></TH></TR>");
        for (int c = 0; c < testAPIComponents.length; c++) {
            ClassDoc classDoc = testAPIComponents[c];
            String componentName = classDoc.name();
            mOut.print("<TR><TD WIDTH=\"1%\"><CODE><B><A HREF=\"components/" + componentName + ".html\">" + componentName + "</A></B></CODE></TD><TD>");
            printInlineTags(classDoc.firstSentenceTags(), classDoc);
            mOut.println("</TD>");
        }
        mOut.println("</TABLE>");
    }
View Full Code Here

      getLogger().verbose("trying to build '"+packageName+"' '"+className+"'");
    }
    String loadme = (packageName.trim().length() > 0) ?
      (packageName + '.'  + className) :
      className;
    ClassDoc cd = mRootDoc.classNamed(loadme);
    if (cd == null) {
      if (getLogger().isVerbose(this)) {
        getLogger().verbose("no ClassDoc for "+loadme);
      }
      return null;
    }
    List importSpecs = null;
    {
      ClassDoc[] imported = cd.importedClasses();
      if (imported != null) {
        importSpecs = new ArrayList();
        for(int i=0; i<imported.length; i++) {
          importSpecs.add(getFdFor(imported[i]));
        }
      }
    }
    {
      PackageDoc[] imported = cd.importedPackages();
      if (imported != null) {
        if (importSpecs == null) importSpecs = new ArrayList();
        for(int i=0; i<imported.length; i++) {
          importSpecs.add(imported[i].name()+".*");
        }
View Full Code Here

  // JamClassPopulator implementation

  public void populate(MClass dest) {
    if (dest == null) throw new IllegalArgumentException("null dest");
    assertInitialized();
    ClassDoc src = (ClassDoc)dest.getArtifact();
    if (src == null) throw new IllegalStateException("null artifact");
    dest.setModifiers(src.modifierSpecifier());
    dest.setIsInterface(src.isInterface());
    if (mTigerDelegate != null) dest.setIsEnumType(mTigerDelegate.isEnum(src));
    // set the superclass
    ClassDoc s = src.superclass();
    if (s != null) dest.setSuperclass(getFdFor(s));
    // set the interfaces
    ClassDoc[] ints = src.interfaces();
    for(int i=0; i<ints.length; i++) {
      dest.addInterface(getFdFor(ints[i]));
View Full Code Here

   */
  public static String getFdFor(Type t) {
    if (t == null) throw new IllegalArgumentException("null type");
    String dim = t.dimension();
    if (dim == null || dim.length() == 0) {
      ClassDoc cd = t.asClassDoc();
      if (cd != null) {
        ClassDoc outer = cd.containingClass();
        if (outer == null) return cd.qualifiedName();
        String simpleName = cd.name();
        simpleName = simpleName.substring(simpleName.lastIndexOf('.')+1);
        return outer.qualifiedName()+'$'+simpleName;
      } else {
        return t.qualifiedTypeName();
      }
    } else {
      StringWriter out = new StringWriter();
View Full Code Here

        if (result == null)
        {
            // System.err.printf("*** Search for CD %s ...\n", className);

            ClassDoc cd = firstSeen.findClass(className);

            // System.err.printf("CD %s ... %s\n", className, cd == null ? "NOT found" : "found");

            result = cd == null ? new ClassDescription() : new ClassDescription(cd, this);

View Full Code Here

        try
        {
            StringWriter writer = new StringWriter(5000);

            ClassDoc classDoc = (ClassDoc) tag.holder();

            if (firstSeen == null)
                firstSeen = classDoc;

            ClassDescription cd = getDescription(classDoc.qualifiedName());

            writeClassDescription(cd, writer);

            streamXdoc(classDoc, writer);
View Full Code Here

                }
            }
            allNamedObjsWriter = new FileWriter(_outputDirectory
                    + File.separator + "allNamedObjs.txt");

            ClassDoc namedObjDoc = root
                    .classNamed("ptolemy.kernel.util.NamedObj");

            Class typedIOPortClass = Class.forName("ptolemy.actor.TypedIOPort");
            Class parameterClass = Class.forName("ptolemy.data.expr.Parameter");
            // The expression in the Expression actor is a StringAttribute.
View Full Code Here

TOP

Related Classes of com.sun.javadoc.ClassDoc

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.