本文整理汇总了Java中com.sun.javadoc.PackageDoc.name方法的典型用法代码示例。如果您正苦于以下问题:Java PackageDoc.name方法的具体用法?Java PackageDoc.name怎么用?Java PackageDoc.name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.javadoc.PackageDoc
的用法示例。
在下文中一共展示了PackageDoc.name方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExportedPackage
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
private String getExportedPackage(ClassDoc clz) {
if (clz == null) {
return "";
}
PackageDoc cpkg = clz.containingPackage();
String pkg = cpkg == null ? "" : (cpkg.name());
for (AnnotationDesc a : clz.annotations()) {
if (a.annotationType().name().equals("ExportPackage")) {
for (AnnotationDesc.ElementValuePair p : a.elementValues()) {
pkg = p.value().toString();
break;
}
}
}
pkg = pkg.replaceAll("\"", "");
return pkg;
}
示例2: header
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
/**
* Appends to the current document the class
* header. Consists in the class name with a
* level 1 header, the class hierarchy, and
* the comment text.
*/
private void header() {
title();
newLine();
newLine();
final PackageDoc packageDoc = classDoc.containingPackage();
final String packageName = packageDoc.name();
item();
text(MarkletConstant.PACKAGE);
character(' ');
link(packageName, MarkletConstant.README_LINK);
newLine();
item();
classHierarchy();
interfaceHierarchy();
newLine();
newLine();
description(classDoc);
newLine();
newLine();
}
示例3: forRoot
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
/**
* Return the inverse path for a package.
* For example, if the package is java.lang,
* the inverse path is ../...
*/
public static DocPath forRoot(PackageDoc pd) {
String name = (pd == null) ? "" : pd.name();
if (name.isEmpty())
return empty;
return new DocPath(name.replace('.', '/').replaceAll("[^/]+", ".."));
}
示例4: SubDomain
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
/**
* Instantiates a new Domain model.
*
*/
private SubDomain(final PackageDoc doc, final AnnotationDesc desc) {
this.codeName = doc.name();
for (AnnotationDesc.ElementValuePair member : desc.elementValues()) {
switch (member.element().name()) {
case "name":
this.title = getString(member);
break;
case "description":
this.description = getString(member);
break;
default:
}
}
this.links = Arrays.stream(doc.annotations())
.filter(ad -> isAnnotatedAsLink(ad.annotationType()))
.map(LinkModel::makeByLink)
.collect(Collectors.toList());
this.links.addAll(Arrays.stream(doc.annotations())
.filter(ad -> isAnnotatedAsLinks(ad.annotationType()))
.map(LinkModel::makeByLinks)
.flatMap(Collection::stream)
.collect(Collectors.toList())
);
this.concepts = new ArrayList<>();
}
示例5: getPackageSourceDirs
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
/**
* Try to determine the source directory for the given package by
* looking at the path specified by -sourcepath, or the current
* directory if -sourcepath hasn't been specified.
*
* @throws IOException if the source directory couldn't be
* located.
*
* @return List of File
*/
protected List getPackageSourceDirs(PackageDoc packageDoc)
throws IOException
{
if (null == sourcePaths) {
for (int i=0; i<rootDoc.options().length; ++i) {
if ("-sourcepath".equals(rootDoc.options()[i][0])
|| "-s".equals(rootDoc.options()[i][0])) {
sourcePaths = new LinkedHashSet();
String sourcepathString = rootDoc.options()[i][1];
StringTokenizer st = new StringTokenizer(sourcepathString, File.pathSeparator);
while (st.hasMoreTokens()) {
sourcePaths.add(new File(st.nextToken()));
}
}
}
if (null == sourcePaths) {
sourcePaths = new LinkedHashSet();
sourcePaths.add(new File(System.getProperty("user.dir")));
}
}
String packageSubDir = packageDoc.name().replace('.', File.separatorChar);
Iterator it = sourcePaths.iterator();
List result = new LinkedList();
while (it.hasNext()) {
File pathComponent = (File)it.next();
File packageDir = new File(pathComponent, packageSubDir);
if (packageDir.exists()) {
result.add(packageDir);
}
}
if (result.isEmpty()) {
throw new IOException("Couldn't locate source directory for package " + packageDoc.name());
}
else {
return result;
}
}
示例6: PackageDocResource
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public PackageDocResource(OrchidContext context, PackageDoc packageDoc) {
super(context, packageDoc.name(), packageDoc);
}
示例7: JavadocPackagePage
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public JavadocPackagePage(OrchidContext context, PackageDoc packageDoc, List<JavadocClassPage> classes) {
super(new PackageDocResource(context, packageDoc), "javadocPackage", packageDoc.name());
this.packageDoc = packageDoc;
this.classes = classes;
}
示例8: ExternalRef
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public ExternalRef(PackageDoc packageDoc) {
name = packageDoc.name();
qualifiedName = packageDoc.name();
url = ExternalRefProvider.this.url + packageDoc.name().replace('.', '/') + "/package-summary.html";
}
示例9: getPackageDocRef
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
@Override
public DocReferenceable getPackageDocRef(PackageDoc packageDoc) {
return new UnknownApiRef(packageDoc.name());
}
示例10: ApiPageRef
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public ApiPageRef(PackageDoc packageDoc, ApiPage apiPage) {
this.name = packageDoc.name();
this.qualifiedName = packageDoc.name();
this.apiPage = apiPage;
this.anchor = null;
}
示例11: PackagePage
import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public PackagePage(PackageDoc packageDoc, Path outputDir) {
super(outputDir, packageDoc.name(), "package-summary.html");
this.packageDoc = packageDoc;
}