org.eclipse.jdt.internal.compiler.util.Util.archiveFormat()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(184)

本文整理了Java中org.eclipse.jdt.internal.compiler.util.Util.archiveFormat()方法的一些代码示例,展示了Util.archiveFormat()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.archiveFormat()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.util.Util
类名称:Util
方法名:archiveFormat

Util.archiveFormat介绍

[英]Returns the kind of archive this file is. The format is one of #ZIP_FILE or #JMOD_FILE
[中]返回此文件的存档类型。格式为#ZIP_文件或#JMOD_文件

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
  public boolean accept(File dir, String name) {
    return Util.archiveFormat(name) > -1;
  }
};

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean accept(File dir, String name) {
    return Util.archiveFormat(name) > -1;
  }
};

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private static String getModulePathForArchive(File file) {
  int format = Util.archiveFormat(file.getAbsolutePath());
  if (format == Util.ZIP_FILE) {
    return IModule.MODULE_INFO_CLASS;
  } else if(format == Util.JMOD_FILE) {
    return "classes/" + IModule.MODULE_INFO_CLASS; //$NON-NLS-1$
  }
  return null;
}
private static IModule extractModuleFromArchive(File file, Classpath pathEntry, String path, String release) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private static boolean isJar(File file) {
  int format = Util.archiveFormat(file.getAbsolutePath());
  return format >= Util.ZIP_FILE;
}
private static IModule extractModuleFromJar(File file, Classpath pathEntry) {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

String id = null;
if (f.isFile()) {
  int kind = Util.archiveFormat(classpath);
  switch (kind) {
    case Util.ZIP_FILE:

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

String id = null;
if (f.isFile()) {
  int kind = Util.archiveFormat(classpath);
  switch (kind) {
    case Util.ZIP_FILE:

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

static ClasspathLocation forLibrary(String libraryPathname, 
                    long lastModified, 
                    AccessRuleSet accessRuleSet, 
                    IPath annotationsPath,
                    boolean autoModule) {
  return Util.isJrt(libraryPathname) ?
      new ClasspathJrt(libraryPathname, annotationsPath) :
        Util.archiveFormat(libraryPathname) == Util.JMOD_FILE ?
          new ClasspathJMod(libraryPathname, lastModified, accessRuleSet, annotationsPath) :
      new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule);

}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

static ClasspathLocation forLibrary(String libraryPathname, 
                    long lastModified, 
                    AccessRuleSet accessRuleSet, 
                    IPath annotationsPath,
                    boolean autoModule,
                    String compliance) {
  return Util.archiveFormat(libraryPathname) == Util.JMOD_FILE ?
          new ClasspathJMod(libraryPathname, lastModified, accessRuleSet, annotationsPath) :
            (compliance == null || (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?
      new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule) :
        new ClasspathMultiReleaseJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule, compliance));

}
static ClasspathJrt forJrtSystem(String jrtPath, AccessRuleSet accessRuleSet, IPath annotationsPath, String release) {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

Util.archiveFormat(currentClasspathName) > -1) {
throw new IllegalArgumentException(
  this.bind("configure.unexpectedDestinationPathEntryFile", //$NON-NLS-1$

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

int format = Util.archiveFormat(classpathName);
if (format == Util.ZIP_FILE) {
  if (isSourceOnly) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

Util.archiveFormat(currentClasspathName) > -1) {
throw new IllegalArgumentException(
  this.bind("configure.unexpectedDestinationPathEntryFile", //$NON-NLS-1$

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

int format = Util.archiveFormat(classpathName);
if (format == Util.ZIP_FILE) {
  if (isSourceOnly) {

相关文章