当前位置: 首页>>代码示例>>Java>>正文


Java RootDoc.classes方法代码示例

本文整理汇总了Java中com.sun.javadoc.RootDoc.classes方法的典型用法代码示例。如果您正苦于以下问题:Java RootDoc.classes方法的具体用法?Java RootDoc.classes怎么用?Java RootDoc.classes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.javadoc.RootDoc的用法示例。


在下文中一共展示了RootDoc.classes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startDoc

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private boolean startDoc(RootDoc root) throws IOException {
    ClassDoc[] classes = root.classes();
    String[][] options = root.options();
    for (String[] op : options) {
        if (op[0].equals("destdir")) {
            destDir = op[1];
        }
    }
    for (ClassDoc clazz : classes) {
        processClass(clazz);
    }
    if (errorCount > 0) {
        throw new IOException("FAILED: " + errorCount + " errors found");
    }
    return true;
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:17,代码来源:Doclet.java

示例2: startGeneration

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
/**
 * Start the generation of files. Call generate methods in the individual
 * writers, which will in turn genrate the documentation files. Call the
 * TreeWriter generation first to ensure the Class Hierarchy is built first
 * and then can be used in the later generation.
 * 
 * @see com.sun.javadoc.RootDoc
 */
private void startGeneration(RootDoc root) throws Exception {
	if (root.classes().length == 0) {
		configuration.message.error("doclet.No_Public_Classes_To_Document");
		return;
	}
	configuration.setOptions();
	configuration.getDocletSpecificMsg().notice("doclet.build_version",
			configuration.getDocletSpecificBuildDate());

	WRDoc wrDoc = new WRDoc(configuration);

	generateWRDocFiles(root, wrDoc);

	configuration.tagletManager.printReport();
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:24,代码来源:AbstractDoclet.java

示例3: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc doc) throws FileNotFoundException, IOException {
    if(out == null) out = System.out;
    for (ClassDoc cls : doc.classes()) {
        Map<String, MethodDoc> allProps = getPropNames(cls);
        for (MethodDoc m : cls.methods()) {
            String propName = getPropName(m, true);
            if (propName != null) {
                MethodDoc mDeclaring = allProps.get(propName);
                if (mDeclaring != null) {
                    boolean supported = false;
                    if (m.name().startsWith("get") || m.name().startsWith("is")) {
                        supported = m.returnType().equals(mDeclaring.returnType());
                    } else if (m.name().startsWith("set")) {
                        supported = m.parameters()[0].type().equals(mDeclaring.returnType());
                    }
                    if (supported) {
                        out.println(cls.qualifiedName() + "." + propName);
                    }
                }
            }
        }
    }
    return true;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:25,代码来源:Template.java

示例4: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(final RootDoc root) {
    for (final ClassDoc cls : root.classes()) {
        final List<ProgramElementDoc> elements = new LinkedList<>();
        elements.add(cls);
        elements.addAll(Arrays.asList(cls.constructors()));
        elements.addAll(Arrays.asList(cls.methods()));
        for (final ProgramElementDoc elem : elements) {
            for (final Tag tag : elem.inlineTags()) {
                final String name = tag.name();
                if (name.equals("@code") && tag.text().trim().startsWith(">")) {
                    generateRunner(cls, elem, tag);
                }
            }
        }
    }
    return true;
}
 
开发者ID:cardillo,项目名称:joinery,代码行数:18,代码来源:DocTestSuite.java

示例5: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) {
  ClassDoc[] classes = root.classes();
  for (int i = 0; i < classes.length; i++) {
    System.out.println(classes[i]);
    ClassDoc classdoc = classes[i];
    String x = classdoc.getRawCommentText();
    System.out.println(x);
    MethodDoc[] methods = classes[i].methods();
    for (int j = 0; j < methods.length; j++) {
      MethodDoc m = methods[j];
      System.out.println(m.getRawCommentText());
      if (m.isPublic()) {
        System.out.println("\t" + m.name());
        Parameter[] parameters = m.parameters();
        for (int k = 0; k < parameters.length; k++) {
          Parameter p = parameters[k];
          System.out.println("\t\t" + p.name() + ": " + p.type().qualifiedTypeName());
        }
      }
    }
  }
  return true;
}
 
开发者ID:MyRobotLab,项目名称:myrobotlab,代码行数:24,代码来源:ListMethodsDoclet.java

示例6: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
/**
 * Entry point for Javadoc Doclet.
 *
 * @param root {@link RootDoc} passed in by Javadoc
 * @return is successful or not
 */
public static boolean start(RootDoc root)
{
  final DocInfo docInfo = new DocInfo();

  for (ClassDoc classDoc : root.classes())
  {
    docInfo.setClassDoc(classDoc.qualifiedName(), classDoc);

    for (MethodDoc methodDoc : classDoc.methods())
    {
      docInfo.setMethodDoc(MethodIdentity.create(methodDoc), methodDoc);
    }
  }

  _docInfo.put(_id, docInfo);

  return true;
}
 
开发者ID:ppdai,项目名称:rest4j,代码行数:25,代码来源:Rest4JDoclet.java

示例7: filterTestAPIComponents

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
/**
 * Returns an array of the classes that are Test API components interfaces,
 * sorted alphabetically.
 *
 * @param root the RootDoc passed to the doclet
 * @return an array of the classes that are Test API components interfaces,
 * sorted alphabetically
 */
private static ClassDoc[] filterTestAPIComponents(RootDoc root) {
    ClassDoc[] classes = root.classes();
    sortClassesAlphabetically(classes);

    ArrayList<ClassDoc> verbsList = new ArrayList<>(classes.length);
    for (ClassDoc classDoc : classes) {
        if (isTestAPI(classDoc, root)) {
            // Exclude factory classes (MultipleInstancesComponent, SingletonComponent, ...)
            if (!classDoc.qualifiedTypeName().startsWith(TEST_API_KERNEL_PACKAGE)) {
                verbsList.add(classDoc);
            }
        }
    }

    return verbsList.toArray(new ClassDoc[verbsList.size()]);
}
 
开发者ID:qspin,项目名称:qtaste,代码行数:25,代码来源:TestAPIDoclet.java

示例8: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) {
  //look for debug flag
  for (String[] opts : root.options()) {
    for (String opt : opts) {
      if (opt.equals(DEBUG_SWITCH)) {
        debugMode = true;
      }
    }
  }

  logMessage("Running doclet " + ConfigStandardDoclet.class.getSimpleName());
  ClassDoc[] classes = root.classes();
  for (int i = 0; i < classes.length; ++i) {
    processDoc(classes[i]);
  }

  return true;
}
 
开发者ID:apache,项目名称:tez,代码行数:19,代码来源:ConfigStandardDoclet.java

示例9: build

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private boolean build(RootDoc rootDoc) {
    this.readOptions(rootDoc.options());

    ClassDoc[] classes = rootDoc.classes();

    for (int i = 0; i < classes.length; ++i) {
        ClassDoc classDoc = classes[i];

        PSItemDoc itemDoc = PSItemDoc.build(classDoc);
        if (itemDoc != null) this.psItems.add(itemDoc);

        PSOperatorWrapperDoc operatorWrapperDoc = PSOperatorWrapperDoc.build(classDoc);
        if (operatorWrapperDoc != null) this.psOperatorWrappers.add(operatorWrapperDoc);

        if (Utils.instanceOf(classDoc, Consts.TYPE_P_STREAM)) {
            for (MethodDoc methodDoc : classDoc.methods()) {
                PSPipelineDoc pipelineDoc = PSPipelineDoc.build(classDoc, methodDoc);
                if (pipelineDoc != null) {
                    this.psPipelines.add(pipelineDoc);
                }
            }
        }
    }

    this.dump();
    return true;
}
 
开发者ID:PrivacyStreams,项目名称:PrivacyStreams,代码行数:28,代码来源:PSDoclet.java

示例10: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) throws ClassNotFoundException, NoSuchMethodException {
    ClassDoc[] classDocs = root.classes();
    List<ApiModule> apiModules = new LinkedList<>();
    for (int i = 0; i < classDocs.length; i++) {
        ClassDoc aClass = classDocs[i];

        Class<?> moduleType = Class.forName(aClass.qualifiedTypeName());
        ClassFilter classFilter = ClassFilterFactory.getDefaultFilter();
        if (!classFilter.filter(moduleType)) {
            continue;
        }

        ApiModule apiModule = new ApiModule();
        apiModule.setType(moduleType);
        apiModule.setComment(aClass.commentText());

        MethodDoc[] methods = aClass.methods(false);

        for (MethodDoc method : methods) {
            Class[] paramTypes = paramTypes(method);
            Method m = moduleType.getDeclaredMethod(method.name(), paramTypes);
            DocTags docTags = SunDocUtils.getDocsForTag(method);

            ApiAction apiAction = new ApiAction();
            apiAction.setComment(method.commentText());
            apiAction.setName(method.name());
            apiAction.setDocTags(docTags);
            apiAction.setMethod(m);
            apiModule.getApiActions().add(apiAction);
        }

        apiModules.add(apiModule);
    }
    ApiModulesHolder.setCurrentApiModules(apiModules);//设置当前的解析结果
    return true;
}
 
开发者ID:treeleafj,项目名称:xDoc,代码行数:37,代码来源:SunDocHandler.java

示例11: checkForDeprecation

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
protected boolean checkForDeprecation(RootDoc root) {
	ClassDoc[] classarr = root.classes();
	for (int i = 0; i < classarr.length; i++) {
		if (isGeneratedDoc(classarr[i])) {
			return true;
		}
	}
	return false;
}
 
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:10,代码来源:ConfigurationImpl.java

示例12: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) {
    for (ClassDoc d : root.classes()) {
        for (AnnotationDesc a : d.annotations()) {
            System.out.println(a.annotationType());
        }
    }
    return true;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:Main.java

示例13: startDoc

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private boolean startDoc(RootDoc root) throws IOException {
    ClassDoc[] classes = root.classes();
    String[][] options = root.options();
    for (String[] op : options) {
        if (op[0].equals("dest")) {
            destFile = op[1];
        }
    }
    for (ClassDoc clazz : classes) {
        processClass(clazz);
    }
    resources.store(destFile);
    return true;
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:15,代码来源:ResourceDoclet.java

示例14: doParse

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
@Override
public void doParse(final RootDoc root) throws DocletParserException {
	ClassDoc[] classDocs = root.classes();
	for (ClassDoc classDoc : classDocs) {
		parseClassDoc(classDoc);
	}
}
 
开发者ID:azuki-framework,项目名称:azuki-doclet-jaxrs,代码行数:8,代码来源:JAXRSDocletParser.java

示例15: startGeneration3

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private boolean startGeneration3(RootDoc root) throws Exception {
  configuration = ConfigurationImpl.getInstance();
  configuration.root = root;

  if (root.classes().length == 0) {
    configuration.message.
        error("doclet.No_Public_Classes_To_Document");
    return false;
  }
  configuration.setOptions();
  configuration.getDocletSpecificMsg().notice("doclet.build_version",
      configuration.getDocletSpecificBuildDate());
  ClassTree classtree = new ClassTree(configuration,
      configuration.nodeprecated);

  generateClassFiles(root, classtree);
  if (configuration.sourcepath != null
      && configuration.sourcepath.length() > 0) {
    StringTokenizer pathTokens = new StringTokenizer(configuration.sourcepath,
        String.valueOf(File.pathSeparatorChar));
    boolean first = true;
    while (pathTokens.hasMoreTokens()) {
      Util.copyDocFiles(configuration,
          pathTokens.nextToken() + File.separator,
          DocletConstants.DOC_FILES_DIR_NAME, first);
      first = false;
    }
  }

  PackageListWriter.generate(configuration);
  generatePackageFiles(classtree);

  generateOtherFiles(root, classtree);
  configuration.tagletManager.printReport();
  return true;
}
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:37,代码来源:ChronoscopeDoclet.java


注:本文中的com.sun.javadoc.RootDoc.classes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。