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


Java IClasspathEntry.getExtraAttributes方法代码示例

本文整理汇总了Java中org.eclipse.jdt.core.IClasspathEntry.getExtraAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java IClasspathEntry.getExtraAttributes方法的具体用法?Java IClasspathEntry.getExtraAttributes怎么用?Java IClasspathEntry.getExtraAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jdt.core.IClasspathEntry的用法示例。


在下文中一共展示了IClasspathEntry.getExtraAttributes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isMavenPomDerived

import org.eclipse.jdt.core.IClasspathEntry; //导入方法依赖的package包/类
private boolean isMavenPomDerived(final IClasspathEntry classpathEntry) {
  for (final IClasspathAttribute classpathAttribute : classpathEntry.getExtraAttributes()) {
    if (Objects.equals(classpathAttribute.getName(), "maven.pomderived")) {
      return Objects.equals(classpathAttribute.getValue(), "true");
    }
  }
  return false;
}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:9,代码来源:IconConfigurationReader.java

示例2: hasNonDependencyAttribute

import org.eclipse.jdt.core.IClasspathEntry; //导入方法依赖的package包/类
private boolean hasNonDependencyAttribute(File jar) throws JavaModelException {
  IJavaProject javaProject = JavaCore.create(project);
  for (IClasspathEntry entry : javaProject.getRawClasspath()) {
    if (entry.getPath().toFile().equals(jar)) {
      for (IClasspathAttribute attribute : entry.getExtraAttributes()) {
        if (isNonDependencyAttribute(attribute)) {
          return true;
        }
      }
    }
  }
  return false;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:14,代码来源:CreateAppEngineFlexWtpProjectTest.java

示例3: compare

import org.eclipse.jdt.core.IClasspathEntry; //导入方法依赖的package包/类
private static void compare(LibraryClasspathContainer expected,
    LibraryClasspathContainer actual) {
  assertEquals(expected.getPath(), actual.getPath());
  assertEquals(expected.getKind(), actual.getKind());
  assertEquals(expected.getDescription(), actual.getDescription());
  for (int i = 0; i < expected.getClasspathEntries().length; i++) {
    IClasspathEntry classpathEntry = expected.getClasspathEntries()[i];
    IClasspathEntry otherClasspathEntry = actual.getClasspathEntries()[i];
    assertEquals(classpathEntry.getPath(), otherClasspathEntry.getPath());
    assertEquals(classpathEntry.getEntryKind(), otherClasspathEntry.getEntryKind());
    assertEquals(classpathEntry.getSourceAttachmentPath(),
        otherClasspathEntry.getSourceAttachmentPath());
    assertEquals(classpathEntry.isExported(), otherClasspathEntry.isExported());
    for (int j = 0; j < classpathEntry.getAccessRules().length; j++) {
      IAccessRule accessRule = classpathEntry.getAccessRules()[j];
      IAccessRule otherAccessRule = otherClasspathEntry.getAccessRules()[j];
      assertEquals(accessRule.getKind(), otherAccessRule.getKind());
      assertEquals(accessRule.getPattern(), otherAccessRule.getPattern());
    }
    for (int k = 0; k < classpathEntry.getExtraAttributes().length; k++) {
      IClasspathAttribute classpathAttribute = classpathEntry.getExtraAttributes()[k];
      IClasspathAttribute otherClasspathAttribute = otherClasspathEntry.getExtraAttributes()[k];
      assertEquals(classpathAttribute.getName(), otherClasspathAttribute.getName());
      assertEquals(classpathAttribute.getValue(), otherClasspathAttribute.getValue());
    }
  }
  
  List<LibraryFile> libraryFiles = actual.getLibraryFiles();
  if (libraryFiles.size() != 0) {
    for (int i = 0; i < libraryFiles.size(); i++) {
      assertEquals(libraryFiles.get(i), actual.getLibraryFiles().get(i));
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:35,代码来源:LibraryClasspathContainerSerializerTest.java

示例4: getArtifactClassifier

import org.eclipse.jdt.core.IClasspathEntry; //导入方法依赖的package包/类
private static String getArtifactClassifier(IClasspathEntry entry) {
  IClasspathAttribute[] attributes = entry.getExtraAttributes();
  for(IClasspathAttribute attribute : attributes) {
    if(IClasspathManager.CLASSIFIER_ATTRIBUTE.equals(attribute.getName())) {
      return attribute.getValue();
    }
  }
  return null;
}
 
开发者ID:fbricon,项目名称:wildfly-hive,代码行数:10,代码来源:MavenRuntimeClasspathProvider.java


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