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


Java PackageDoc.name方法代码示例

本文整理汇总了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;
}
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:20,代码来源:ChronoscopeDoclet.java

示例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();
}
 
开发者ID:Faylixe,项目名称:marklet,代码行数:28,代码来源:ClassPageBuilder.java

示例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("[^/]+", ".."));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:DocPath.java

示例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<>();

}
 
开发者ID:myunusov,项目名称:maxur-ldoc,代码行数:35,代码来源:SubDomain.java

示例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;
   }
}
 
开发者ID:vilie,项目名称:javify,代码行数:49,代码来源:AbstractDoclet.java

示例6: PackageDocResource

import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public PackageDocResource(OrchidContext context, PackageDoc packageDoc) {
    super(context, packageDoc.name(), packageDoc);
}
 
开发者ID:JavaEden,项目名称:Orchid,代码行数:4,代码来源:PackageDocResource.java

示例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;
}
 
开发者ID:JavaEden,项目名称:Orchid,代码行数:6,代码来源:JavadocPackagePage.java

示例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";
}
 
开发者ID:nicolaschriste,项目名称:docdown,代码行数:6,代码来源:ExternalRefProvider.java

示例9: getPackageDocRef

import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
@Override
public DocReferenceable getPackageDocRef(PackageDoc packageDoc) {
    return new UnknownApiRef(packageDoc.name());
}
 
开发者ID:nicolaschriste,项目名称:docdown,代码行数:5,代码来源:UnknownRefProvider.java

示例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;
}
 
开发者ID:nicolaschriste,项目名称:docdown,代码行数:7,代码来源:ApiPageRef.java

示例11: PackagePage

import com.sun.javadoc.PackageDoc; //导入方法依赖的package包/类
public PackagePage(PackageDoc packageDoc, Path outputDir) {
    super(outputDir, packageDoc.name(), "package-summary.html");
    this.packageDoc = packageDoc;
}
 
开发者ID:nicolaschriste,项目名称:docdown,代码行数:5,代码来源:PackagePage.java


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