本文整理汇总了Java中com.sun.tools.doclets.internal.toolkit.util.ClassTree类的典型用法代码示例。如果您正苦于以下问题:Java ClassTree类的具体用法?Java ClassTree怎么用?Java ClassTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClassTree类属于com.sun.tools.doclets.internal.toolkit.util包,在下文中一共展示了ClassTree类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: generateOtherFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
/**
* Generate additional documentation that is added to the API documentation.
*
* @param root
* the RootDoc of source to document.
* @param classtree
* the data structure representing the class tree.
* @throws Exception builderFactory may throw exception
*/
protected void generateOtherFiles(RootDoc root, ClassTree classtree)
throws Exception {
BuilderFactory builderFactory = configuration.getBuilderFactory();
AbstractBuilder constantsSummaryBuilder = builderFactory
.getConstantsSummaryBuider();
constantsSummaryBuilder.build();
AbstractBuilder serializedFormBuilder = builderFactory
.getSerializedFormBuilder();
serializedFormBuilder.build();
}
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:20,代码来源:AbstractDoclet.java
示例2: generateClassFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
/**
* Generate the class files for single classes specified on the command
* line.
*
* @param classtree
* the data structure representing the class tree.
*/
private void generateClassFiles(ClassTree classtree) {
String[] packageNames = configuration.classDocCatalog.packageNames();
for (int packageNameIndex = 0; packageNameIndex < packageNames.length; packageNameIndex++) {
generateClassFiles(
configuration.classDocCatalog
.allClasses(packageNames[packageNameIndex]),
classtree);
}
}
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:17,代码来源:AbstractDoclet.java
示例3: generateClassFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
@Override
protected void generateClassFiles(ClassDoc[] arr, ClassTree classtree) {
Arrays.sort(arr);
for (int i = 0; i < arr.length; i++) {
if (!(configurationEx.isGeneratedDoc(arr[i]) && arr[i].isIncluded())) {
continue;
}
ClassDoc prev = (i == 0) ? null : arr[i - 1];
ClassDoc curr = arr[i];
ClassDoc next = (i + 1 == arr.length) ? null : arr[i + 1];
try {
if (curr.isAnnotationType()) {
AbstractBuilder annotationTypeBuilder = configurationEx
.getBuilderFactory().getAnnotationTypeBuilder(
(AnnotationTypeDoc) curr, prev, next);
annotationTypeBuilder.build();
} else {
AbstractBuilder classBuilder = configurationEx
.getBuilderFactory().getClassBuilder(curr, prev,
next, classtree);
classBuilder.build();
}
} catch (Exception e) {
e.printStackTrace();
throw new DocletAbortException(e.getMessage());
}
}
}
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:31,代码来源:HtmlDoclet.java
示例4: generateClassFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
@Override
protected void generateClassFiles(ClassDoc[] arr, ClassTree classtree) {
Arrays.sort(arr);
for (int i = 0; i < arr.length; i++) {
if (!(configurationEx.isGeneratedDoc(arr[i]) && arr[i].isIncluded())) {
continue;
}
ClassDoc prev = (i == 0) ? null : arr[i - 1];
ClassDoc curr = arr[i];
ClassDoc next = (i + 1 == arr.length) ? null : arr[i + 1];
try {
if (curr.isAnnotationType()) {
AbstractBuilder annotationTypeBuilder = configurationEx
.getBuilderFactory().getAnnotationTypeBuilder(
(AnnotationTypeDoc) curr, prev, next);
annotationTypeBuilder.build();
} else {
AbstractBuilder classBuilder = configurationEx
.getBuilderFactory().getClassBuilder(curr, prev,
next, classtree);
classBuilder.build();
}
} catch (Exception e) {
e.printStackTrace();
throw new DocletAbortException();
}
}
}
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk7,代码行数:31,代码来源:HtmlDoclet.java
示例5: startGeneration3
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的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
示例6: generateGss
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
protected void generateGss(RootDoc rootDoc, ClassTree classTree)
throws Exception {
final HtmlDocletWriter writer = new HtmlDocletWriter(configuration,
"gssdoc.html");
GssDocGenerator gss = new GssDocGenerator() {
@Override
protected void p(String str) {
writer.write(str);
}
};
gss.generateGssDocs();
writer.flush();
writer.close();
}
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:15,代码来源:ChronoscopeDoclet.java
示例7: generateGssWiki
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
protected void generateGssWiki(RootDoc rootDoc, ClassTree classTree)
throws Exception {
final HtmlDocletWriter writer = new HtmlDocletWriter(configuration,
"gssdoc.wiki");
GssWikiDocGenerator gss = new GssWikiDocGenerator() {
@Override
protected void p(String str) {
writer.write(str);
}
};
gss.generateGssDocs();
writer.flush();
writer.close();
}
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:15,代码来源:ChronoscopeDoclet.java
示例8: getSubClasses
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
public List getSubClasses()
{
if (subs == null)
{
ClassDoc doc = (ClassDoc) getVariables().get("curitem");
ClassTree tree = (ClassTree) getVariables().get("classTree");
subs = getSubClassesCopy(doc, tree, false);
}
return subs;
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:11,代码来源:JOTDocletNavView.java
示例9: getSubClassesCopy
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
private List getSubClassesCopy(ClassDoc doc, ClassTree tree, boolean all)
{
List subs = all ? tree.allSubs(doc, false) : tree.subs(doc, false);
if (subs.size() > 100)
{
subs = new Vector().subList(0, 0);
}
// we do a defensive copy, otherwise we have issues later.
ArrayList list = new ArrayList(subs);
//System.out.println("copy " + list.size() + " " + all);
return list;
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:13,代码来源:JOTDocletNavView.java
示例10: getAllSubClasses
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
public List getAllSubClasses()
{
if (allSubs == null)
{
ClassDoc doc = (ClassDoc) getVariables().get("curitem");
ClassTree tree = (ClassTree) getVariables().get("classTree");
allSubs = getSubClassesCopy(doc, tree, true);
}
return allSubs;
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:11,代码来源:JOTDocletNavView.java
示例11: generateNav
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
protected void generateNav(ClassTree tree) throws Exception
{
int nb = 1;
String cpt = "";
if (new File((OUT_ROOT + "index.html")).exists())
{
while (new File(OUT_ROOT + "index" + nb + ".html").exists())
{
nb++;
}
cpt = "" + nb;
indexFile = "index" + nb + ".html";
}
JOTDocletNavView view = new JOTDocletNavView(docWriter);
view.addVariable("indexfile", indexFile);
view.addVariable("nav", "overview-frame" + cpt + ".html");
// write index
System.out.println("Index: " + OUT_ROOT + "index" + cpt + ".html");
String html = JOTViewParser.parseTemplate(view, RES_ROOT, "tpl" + File.separator + "index.html");
PrintWriter writer = new PrintWriter(OUT_ROOT + "index" + cpt + ".html");
writer.write(html);
writer.close();
PackageDoc[] packages = configuration.packages;
Arrays.sort(packages);
File navigator = new File(OUT_ROOT + "overview-frame" + cpt + ".html");
// writing navigator
writer = new PrintWriter(navigator);
System.out.println("Navigator: " + navigator.getAbsolutePath());
addViewConstants(view);
view.addVariable(JOTDocletNavView.PACKAGES, packages);
html = JOTViewParser.parseTemplate(view, RES_ROOT, "tpl" + File.separator + "nav.html");
writer.print(html);
writer.close();
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:36,代码来源:JOTDoclet.java
示例12: getClassWriter
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
public ClassWriter getClassWriter(ClassDoc arg0, ClassDoc arg1,
ClassDoc arg2, ClassTree arg3) throws Exception {
// TODO Auto-generated method stub
return null;
}
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:6,代码来源:WriterFactoryImpl.java
示例13: start
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
public static boolean start(RootDoc root) {
javadocRoot = root;
javadocTree = new ClassTree(root, new EmptyJavadocConfiguration());
return true;
}
开发者ID:arafalov,项目名称:Solr-Components,代码行数:7,代码来源:HierarchyGenerator.java
示例14: startGeneration
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
private void startGeneration(RootDoc root) throws Exception
{
if (root.classes().length == 0)
{
configuration.message.error("doclet.No_Public_Classes_To_Document");
return;
}
classTree = new ClassTree(configuration, configuration.nodeprecated);
OUT_ROOT = configuration.docFileDestDirName;
new File(OUT_ROOT).mkdirs();
//System.out.println(OUT_ROOT);
String[] levels =
{
"" + JOTLogger.CRITICAL_LEVEL, "" + JOTLogger.ERROR_LEVEL, "" + JOTLogger.WARNING_LEVEL
};
JOTLogger.init(OUT_ROOT + File.separator + "jotdoclet.log", levels, null);
if (flagCopyResources)
{
copyResources();
}
if (flagGenerateNav)
{
generateNav(classTree);
}
if (!flagNavOnly)
{
if (flagGeneratePackageList)
{
generatePackageList(classTree);
}
if (flagGeneratePackageFiles)
{
// generate package files and items
generatePackageFiles(classTree);
}
if (flagGenerateIndex)
{
generateIndex();
}
// only save sitemap if !navonly
} else
{
System.out.println("Done (packOnly requested.)");
}
configuration.tagletManager.printReport();
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:52,代码来源:JOTDoclet.java
示例15: generatePackageFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
protected void generatePackageFiles(ClassTree arg0) throws Exception
{
int pkLength = 0;
int itemsLength = 0;
PackageDoc[] packages = configuration.packages;
Arrays.sort(packages);
JOTDocletNavView view = new JOTDocletNavView(docWriter);
addViewConstants(view);
// write individual package pages
pkLength = packages.length;
for (int i = 0; i != packages.length; i++)
{
view.reset();
PackageDoc pack = packages[i];
view.addVariable("curitem", pack);
String folder = getPkgFolder(pack);
view.addVariable("curpage", folder + "package-summary.html");
new File(OUT_ROOT + folder).mkdirs();
File packFile = new File(OUT_ROOT + folder + "package-summary.html");
System.out.println(packFile.getAbsolutePath());
PrintWriter writer = new PrintWriter(packFile);
String html = "";
try
{
html = JOTViewParser.parseTemplate(view, RES_ROOT, "tpl" + File.separator + "package.html");
} catch (Exception e)
{
e.printStackTrace();
}
writer.print(html);
writer.close();
//package items pages
ClassDoc[] items = view.getSortedClasses(pack);
for (int j = 0; j != items.length; j++)
{
if (flagGenerateItemFiles)
{
generateClassFiles(items[j], folder);
}
if (flagGenerateSourceFiles)
{
generateSourceFile(items[j], folder);
}
itemsLength++;
if (itemsLength % 100 == 0)
{
System.out.println("Doing garbage collection");
System.out.println("Before " + Runtime.getRuntime().freeMemory());
System.gc();
System.out.println("After " + Runtime.getRuntime().freeMemory());
}
}
}
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:58,代码来源:JOTDoclet.java
示例16: generateClassFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
protected void generateClassFiles(ClassDoc[] arg0, ClassTree arg1)
{
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:4,代码来源:JOTDoclet.java
示例17: generatePackageFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
/**
* Generate the package documentation.
*
* @param classtree
* the data structure representing the class tree.
* @throws Exception blablabla
*/
protected abstract void generatePackageFiles(ClassTree classtree)
throws Exception;
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:10,代码来源:AbstractDoclet.java
示例18: generatePackageFiles
import com.sun.tools.doclets.internal.toolkit.util.ClassTree; //导入依赖的package包/类
@Override
protected void generatePackageFiles(ClassTree arg0) throws Exception {
}
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:5,代码来源:HtmlDoclet.java
注:本文中的com.sun.tools.doclets.internal.toolkit.util.ClassTree类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论