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


Java Configuration类代码示例

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


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

示例1: PathDocFileFactory

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:PathDocFileFactory.java

示例2: WRDoc

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
public WRDoc(Configuration configuration) {
	this.configuration = configuration;
	Calendar c = Calendar.getInstance();
	DateFormat df = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss"); 
	this.docGeneratedDate = df.format(c.getTime());
	this.builders.add(new RESTDocBuilder(this));
	this.logger.debug("RESTDocBuilder loaded.");
	this.builders.add(new SOAPDocBuilder(this));
	this.logger.debug("SOAPDocBuilder loaded.");
	String dubboConfigPath = ((AbstractConfiguration) this.configuration).dubboconfigpath;
	this.builders.add(new DubboDocBuilder(this));
	this.logger.debug("DubboDocBuilder loaded with config path:" + dubboConfigPath);
	this.builders.add(new MQDocBuilder(this));
	this.logger.debug("MQDocBuilder loaded.");
	this.build();
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:17,代码来源:WRDoc.java

示例3: processOpenAPIClasses

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
@Override
protected void processOpenAPIClasses(ClassDoc[] classes,
		Configuration configuration) {
	for (int i = 0; i < classes.length; i++) {
		if (configuration.nodeprecated
				&& (Util.isDeprecated(classes[i]) || Util
						.isDeprecated(classes[i].containingPackage()))) {
			continue;
		}

		if (this.isServiceInterface(classes[i])) {
			this.processServiceClass(classes[i], configuration);
			MethodDoc[] methods = classes[i].methods();
			for (int l = 0; l < methods.length; l++) {
				if (configuration.nodeprecated
						&& Util.isDeprecated(methods[l])) {
					continue;
				}
				this.processOpenAPIMethod(methods[l], configuration);
			}
		}
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:24,代码来源:AbstractServiceDocBuilder.java

示例4: processServiceClass

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
protected void processServiceClass(ClassDoc service,
		Configuration configuration) {
	Tag[] serviceTagArray = service.tags(WRTagTaglet.NAME);
	for (int i = 0; i < serviceTagArray.length; i++) {
		Set<String> serviceTags = WRTagTaglet.getTagSet(serviceTagArray[i]
				.text());
		for (Iterator<String> iter = serviceTags.iterator(); iter.hasNext();) {
			String tag = iter.next();
			if (!this.taggedOpenAPIMethods.containsKey(tag)) {
				this.taggedOpenAPIMethods
						.put(tag, new HashSet<MethodDoc>());
			}
			// all method of this service should be processed later.
			for (int j = 0; j < service.methods().length; j++) {
				if (configuration.nodeprecated
						&& Util.isDeprecated(service.methods()[j])) {
					continue;
				}
				this.taggedOpenAPIMethods.get(tag)
						.add(service.methods()[j]);
			}
		}

		this.wrDoc.getWRTags().addAll(serviceTags);
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:27,代码来源:AbstractServiceDocBuilder.java

示例5: processOpenAPIClasses

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
@Override
public void processOpenAPIClasses(ClassDoc[] classDocs,
		Configuration configuration) {
	this.excludedUrls = this.getExcludedUrls(configuration);
	processAnnotationDubboInterfaces(classDocs);
	for (int i = 0; i < classDocs.length; i++) {
		if (configuration.nodeprecated
				&& (Util.isDeprecated(classDocs[i]) || Util
						.isDeprecated(classDocs[i].containingPackage()))) {
			continue;
		}

		if (this.isController(classDocs[i])
				|| this.isAPIClass(classDocs[i])) {
			this.processControllerClass(classDocs[i], configuration);
			MethodDoc[] methods = classDocs[i].methods();
			for (int l = 0; l < methods.length; l++) {
				this.processOpenAPIMethod(methods[l], configuration);
			}
		}
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:23,代码来源:RESTDocBuilder.java

示例6: getFactory

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:DocFileFactory.java

示例7: processControllerClass

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
private void processControllerClass(ClassDoc controller,
		Configuration configuration) {
	Tag[] controllerTagArray = controller.tags(WRTagTaglet.NAME);
	for (int i = 0; i < controllerTagArray.length; i++) {
		Set<String> controllerTags = WRTagTaglet
				.getTagSet(controllerTagArray[i].text());
		for (Iterator<String> iter = controllerTags.iterator(); iter
				.hasNext();) {
			String tag = iter.next();
			if (!this.taggedOpenAPIMethods.containsKey(tag)) {
				this.taggedOpenAPIMethods
						.put(tag, new HashSet<MethodDoc>());
			}
			// all action method of this controller should be processed
			// later.
			for (int j = 0; j < controller.methods().length; j++) {
				if (configuration.nodeprecated
						&& Util.isDeprecated(controller.methods()[j])) {
					continue;
				}
				if (isOpenAPIMethod(controller.methods()[j])) {
					this.taggedOpenAPIMethods.get(tag).add(
							controller.methods()[j]);
				}
			}
		}

		this.wrDoc.getWRTags().addAll(controllerTags);
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:31,代码来源:RESTDocBuilder.java

示例8: processOpenAPIClasses

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
@Override
protected void processOpenAPIClasses(ClassDoc[] classes,
		Configuration configuration) {
	LinkedList<String> annotationDubboInterfaces = processAnnotationDubboInterfaces(classes);
	dubboInterfaces.addAll(annotationDubboInterfaces);
	this.logger.debug("dubbo annotation interface list:");
	for (String s : annotationDubboInterfaces) {
		this.logger.debug("interface: " + s);
	}
	super.processOpenAPIClasses(classes, configuration);
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:12,代码来源:DubboDocBuilder.java

示例9: ClassDocCatalog

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Construct a new ClassDocCatalog.
 *
 * @param classdocs the array of ClassDocs to catalog
 */
public ClassDocCatalog (ClassDoc[] classdocs, Configuration config) {
    init();
    this.configuration = config;
    for (int i = 0; i < classdocs.length; i++) {
        addClassDoc(classdocs[i]);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ClassDocCatalog.java

示例10: DeprecatedAPIListBuilder

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param configuration the current configuration of the doclet
 */
public DeprecatedAPIListBuilder(Configuration configuration) {
    deprecatedLists = new ArrayList<List<Doc>>();
    for (int i = 0; i < NUM_TYPES; i++) {
        deprecatedLists.add(i, new ArrayList<Doc>());
    }
    buildDeprecatedAPIInfo(configuration);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:DeprecatedAPIListBuilder.java

示例11: ClassDocCatalog

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Construct a new ClassDocCatalog.
 *
 * @param classdocs the array of ClassDocs to catalog
 */
public ClassDocCatalog (ClassDoc[] classdocs, Configuration config) {
    init();
    this.configuration = config;
    this.utils = config.utils;
    for (ClassDoc classdoc : classdocs) {
        addClassDoc(classdoc);
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:14,代码来源:ClassDocCatalog.java

示例12: copyResource

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Copy the contents of a resource file to this file.
 * @param resource the path of the resource, relative to the package of this class
 * @param overwrite whether or not to overwrite the file if it already exists
 * @param replaceNewLine if false, the file is copied as a binary file;
 *     if true, the file is written line by line, using the platform line
 *     separator
 */
public void copyResource(DocPath resource, boolean overwrite, boolean replaceNewLine) {
    if (exists() && !overwrite)
        return;

    try {
        InputStream in = Configuration.class.getResourceAsStream(resource.getPath());
        if (in == null)
            return;

        try (OutputStream out = openOutputStream()) {
            if (!replaceNewLine) {
                byte[] buf = new byte[2048];
                int n;
                while ((n = in.read(buf)) > 0)
                    out.write(buf, 0, n);
            } else {
                try (BufferedReader reader = new BufferedReader(new InputStreamReader(in));
                     BufferedWriter writer = new BufferedWriter(configuration.docencoding == null
                                                                ? new OutputStreamWriter(out)
                                                                : new OutputStreamWriter(out, configuration.docencoding))) {
                    String line;
                    while ((line = reader.readLine()) != null) {
                        writer.write(line);
                        writer.write(DocletConstants.NL);
                    }
                }
            }
        } finally {
            in.close();
        }
    } catch (IOException e) {
        e.printStackTrace(System.err);
        throw new DocletAbortException(e);
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:44,代码来源:DocFile.java

示例13: DeprecatedAPIListBuilder

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param configuration the current configuration of the doclet
 */
public DeprecatedAPIListBuilder(Configuration configuration) {
    this.configuration = configuration;
    this.utils = configuration.utils;
    deprecatedLists = new ArrayList<>();
    for (int i = 0; i < NUM_TYPES; i++) {
        deprecatedLists.add(i, new ArrayList<Doc>());
    }
    buildDeprecatedAPIInfo();
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:15,代码来源:DeprecatedAPIListBuilder.java

示例14: getFactory

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager) {
            f = new StandardDocFileFactory(configuration);
        } else {
            throw new IllegalStateException();
        }
        factories.put(configuration, f);
    }
    return f;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:18,代码来源:DocFileFactory.java

示例15: getClassLinkLabel

import com.sun.tools.doclets.internal.toolkit.Configuration; //导入依赖的package包/类
/**
 * Return the label for this class link.
 *
 * @param configuration the current configuration of the doclet.
 * @return the label for this class link.
 */
public String getClassLinkLabel(Configuration configuration) {
    if (label != null && label.length() > 0) {
        return label;
    } else if (isLinkable()) {
        return classDoc.name();
    } else {
        return configuration.getClassName(classDoc);
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:16,代码来源:LinkInfo.java


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