• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RootDocImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



RootDocImpl类属于com.sun.tools.javadoc包,在下文中一共展示了RootDocImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getLocale

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Locale getLocale() {
    if (root instanceof RootDocImpl)
        return ((RootDocImpl)root).getLocale();
    else
        return Locale.getDefault();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ConfigurationImpl.java


示例2: showMessage

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
@Override
public boolean showMessage(SourcePosition pos, String key) {
    if (root instanceof RootDocImpl) {
        return pos == null || ((RootDocImpl) root).showTagMessages();
    }
    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ConfigurationImpl.java


示例3: getLocale

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Locale getLocale() {
	if (root instanceof com.sun.tools.javadoc.RootDocImpl)
		return ((com.sun.tools.javadoc.RootDocImpl) root).getLocale();
	else
		return Locale.getDefault();
}
 
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:10,代码来源:ConfigurationImpl.java


示例4: showMessage

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
@Override
public boolean showMessage(SourcePosition pos, String key) {
       if (root instanceof RootDocImpl) {
           return pos == null || ((RootDocImpl) root).showTagMessages();
       }
       return true;
}
 
开发者ID:WinRoad-NET,项目名称:htmldoclet4jdk8,代码行数:8,代码来源:ConfigurationImpl.java


示例5: getFileManager

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public JavaFileManager getFileManager() {
    if (fileManager == null) {
        if (root instanceof RootDocImpl)
            fileManager = ((RootDocImpl) root).getFileManager();
        else
            fileManager = new JavacFileManager(new Context(), false, null);
    }
    return fileManager;
}
 
开发者ID:wmdietl,项目名称:jsr308-langtools,代码行数:14,代码来源:ConfigurationImpl.java


示例6: removeNotPublicApi

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
private static RootDoc removeNotPublicApi (RootDoc rd) throws ReflectiveOperationException {
	if (rd == null) return null;

	RootDocImpl rootDoc = (RootDocImpl) rd;

	//obtain list (containing packages for javadoc) via reflection
	Field pckField = rootDoc.getClass().getDeclaredField("cmdLinePackages");
	pckField.setAccessible(true);
	List<PackageDocImpl> pckList = (List) pckField.get(rootDoc);

	//new filtered packages list
	ListBuffer<PackageDocImpl> pckNewList = new ListBuffer<>();

	for (PackageDocImpl pckImpl : pckList) {
		//obtain symbols field containing classes
		Field symField = pckImpl.getClass().getDeclaredField("sym");
		symField.setAccessible(true);
		PackageSymbol sym = (PackageSymbol) symField.get(pckImpl);

		removeNotPublicApiSymbols(sym);

		//if all classes were removed from package remove it
		//also there is no length lol
		if (sym.members_field.toString().equals("Scope[]") == false) {
			pckNewList.add(pckImpl);
		}
	}

	//finally swap new list, RootDoc won't notice
	pckField.set(rootDoc, pckNewList.toList());

	return rd;

}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:35,代码来源:PublicApiDoclet.java


示例7: setSpecificDocletOptions

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * Depending upon the command line options provided by the user, set
 * configure the output generation environment.
 *
 * @param options The array of option names and values.
 */
@Override
public void setSpecificDocletOptions(String[][] options) {
    for (int oi = 0; oi < options.length; ++oi) {
        String[] os = options[oi];
        String opt = StringUtils.toLowerCase(os[0]);
        if (opt.equals("-footer")) {
            footer = os[1];
        } else if (opt.equals("-header")) {
            header = os[1];
        } else if (opt.equals("-packagesheader")) {
            packagesheader = os[1];
        } else if (opt.equals("-doctitle")) {
            doctitle = os[1];
        } else if (opt.equals("-windowtitle")) {
            windowtitle = os[1].replaceAll("\\<.*?>", "");
        } else if (opt.equals("-top")) {
            top = os[1];
        } else if (opt.equals("-bottom")) {
            bottom = os[1];
        } else if (opt.equals("-helpfile")) {
            helpfile = os[1];
        } else if (opt.equals("-stylesheetfile")) {
            stylesheetfile = os[1];
        } else if (opt.equals("-charset")) {
            charset = os[1];
        } else if (opt.equals("-xdocrootparent")) {
            docrootparent = os[1];
        } else if (opt.equals("-nohelp")) {
            nohelp = true;
        } else if (opt.equals("-splitindex")) {
            splitindex = true;
        } else if (opt.equals("-noindex")) {
            createindex = false;
        } else if (opt.equals("-use")) {
            classuse = true;
        } else if (opt.equals("-notree")) {
            createtree = false;
        } else if (opt.equals("-nodeprecatedlist")) {
            nodeprecatedlist = true;
        } else if (opt.equals("-nonavbar")) {
            nonavbar = true;
        } else if (opt.equals("-nooverview")) {
            nooverview = true;
        } else if (opt.equals("-overview")) {
            overview = true;
        } else if (opt.equals("-xdoclint")) {
            doclintOpts.add(null);
        } else if (opt.startsWith("-xdoclint:")) {
            doclintOpts.add(opt.substring(opt.indexOf(":") + 1));
        }
    }
    if (root.specifiedClasses().length > 0) {
        Map<String,PackageDoc> map = new HashMap<String,PackageDoc>();
        PackageDoc pd;
        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; i++) {
            pd = classes[i].containingPackage();
            if(! map.containsKey(pd.name())) {
                map.put(pd.name(), pd);
            }
        }
    }
    setCreateOverview();
    setTopFile(root);

    if (root instanceof RootDocImpl) {
        ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:76,代码来源:ConfigurationImpl.java


示例8: cache

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * For a given elment find the root of the tree, start JavaDoc processing
 * for the whole tree and cache all results.
 * 
 * @param element
 *            any Java element of an tree
 */
private void cache(IJavaElement element) throws ConQATException {

	IResource rootNode = ResourceTraversalUtils.returnRoot(element);

	Context context = new Context();

	PrintWriter errorWriter = new PrintWriter(new Stream2LoggerAdapter(
			LOGGER, Level.DEBUG, "JavaDoc Error"));
	PrintWriter warningWriter = new PrintWriter(new Stream2LoggerAdapter(
			LOGGER, Level.DEBUG, "JavaDoc Warning"));

	// do not store info messages
	PrintWriter infoWriter = new PrintWriter(new NullOutputStream());

	// This is correct, as the messager attaches itself to the context.
	new SimpleMessager(context, errorWriter, warningWriter, infoWriter);

	JavadocTool tool = JavadocTool.make0(context);

	ModifierFilter showAccess = new ModifierFilter(
			ModifierFilter.ALL_ACCESS);
	String encoding = determineEncoding(rootNode);
	String docLocale = StringUtils.EMPTY_STRING;
	boolean breakiterator = false;
	ListBuffer<String[]> options = new ListBuffer<String[]>();
	ListBuffer<String> includedElements = addAllChildren(rootNode);
	boolean docClasses = false;
	ListBuffer<String> subPackages = new ListBuffer<String>();
	ListBuffer<String> excludedPackages = new ListBuffer<String>();
	boolean quiet = false;

	try {
		RootDocImpl rootDoc = tool.getRootDocImpl(docLocale, encoding,
				showAccess, includedElements.toList(), options.toList(),
				breakiterator, subPackages.toList(),
				excludedPackages.toList(), docClasses, false, quiet);

		if (rootDoc == null) {
			throw new ConQATException("Could not analyze JavaDoc for "
					+ rootNode);
		}

		Map<String, IJavaResource> classLookup = TraversalUtils
				.createIdToNodeMap((IJavaResource) rootNode);
		ClassDoc[] classes = rootDoc.classes();
		for (ClassDoc doc : classes) {
			IJavaResource tmpElement = classLookup.get(doc.qualifiedName());
			if (tmpElement instanceof IJavaElement) {
				cache.put(((IJavaElement) tmpElement).getUniformPath(), doc);
			}
		}
	} catch (Throwable ex) {
		// The dreaded JavaDoc implementation may throw all kinds of stuff,
		// including Errors. Hence, we catch throwable here. Additionally,
		// we minimally support debugging by extracting a somewhat
		// reasonable message.

		String message = ex.getMessage();
		if (message == null) {
			message = ex.getClass().getName();
			message += StringUtils.obtainStackTrace(ex);
		}

		throw new ConQATException(message, ex);
	} finally {
		errorWriter.close();
		warningWriter.close();
		infoWriter.close();
	}

}
 
开发者ID:vimaier,项目名称:conqat,代码行数:79,代码来源:JavaDocCache.java


示例9: setSpecificDocletOptions

import com.sun.tools.javadoc.RootDocImpl; //导入依赖的package包/类
/**
 * Depending upon the command line options provided by the user, set
 * configure the output generation environment.
 *
 * @param options The array of option names and values.
 */
@Override
public void setSpecificDocletOptions(String[][] options) {
    for (int oi = 0; oi < options.length; ++oi) {
        String[] os = options[oi];
        String opt = os[0].toLowerCase();
        if (opt.equals("-footer")) {
            footer = os[1];
        } else if (opt.equals("-header")) {
            header = os[1];
        } else if (opt.equals("-packagesheader")) {
            packagesheader = os[1];
        } else if (opt.equals("-doctitle")) {
            doctitle = os[1];
        } else if (opt.equals("-windowtitle")) {
            windowtitle = os[1];
        } else if (opt.equals("-top")) {
            top = os[1];
        } else if (opt.equals("-bottom")) {
            bottom = os[1];
        } else if (opt.equals("-helpfile")) {
            helpfile = os[1];
        } else if (opt.equals("-stylesheetfile")) {
            stylesheetfile = os[1];
        } else if (opt.equals("-charset")) {
            charset = os[1];
        } else if (opt.equals("-xdocrootparent")) {
            docrootparent = os[1];
        } else if (opt.equals("-nohelp")) {
            nohelp = true;
        } else if (opt.equals("-splitindex")) {
            splitindex = true;
        } else if (opt.equals("-noindex")) {
            createindex = false;
        } else if (opt.equals("-use")) {
            classuse = true;
        } else if (opt.equals("-notree")) {
            createtree = false;
        } else if (opt.equals("-nodeprecatedlist")) {
            nodeprecatedlist = true;
        } else if (opt.equals("-nonavbar")) {
            nonavbar = true;
        } else if (opt.equals("-nooverview")) {
            nooverview = true;
        } else if (opt.equals("-overview")) {
            overview = true;
        } else if (opt.equals("-xdoclint")) {
            doclintOpts.add(null);
        } else if (opt.startsWith("-xdoclint:")) {
            doclintOpts.add(opt.substring(opt.indexOf(":") + 1));
        }
    }
    if (root.specifiedClasses().length > 0) {
        Map<String,PackageDoc> map = new HashMap<String,PackageDoc>();
        PackageDoc pd;
        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; i++) {
            pd = classes[i].containingPackage();
            if(! map.containsKey(pd.name())) {
                map.put(pd.name(), pd);
            }
        }
    }
    setCreateOverview();
    setTopFile(root);

    if (root instanceof RootDocImpl) {
        ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:76,代码来源:ConfigurationImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractFSContract类代码示例发布时间:2022-05-22
下一篇:
Java ConnectionEditPolicy类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap