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


Java StandardLocation.PATCH_MODULE_PATH属性代码示例

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


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

示例1: getLocationForModule

@Override
public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException {
    if (location == StandardLocation.PATCH_MODULE_PATH) {
        final URL url = fo.toUri().toURL();
        for (Map.Entry<URL,String> root : roots.entrySet()) {
            if (FileObjects.isParentOf(root.getKey(), url)) {
                String modName = root.getValue();
                return moduleLocations(location).stream()
                        .filter((ml) -> modName.equals(ml.getModuleName()))
                        .findFirst()
                        .orElse(null);
            }
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:PatchModuleFileManager.java

示例2: createPatchLocation

@NonNull
private static PatchLocation createPatchLocation(
        @NonNull final String modName,
        @NonNull final List<? extends URL> roots) {
    Collection<URL> bin = new ArrayList<>(roots.size());
    Collection<URL> src = new ArrayList<>(roots.size());
    for (URL root : roots) {
        if (JavaIndex.hasSourceCache(root, false)) {
            src.add(root);
        } else {
            bin.add(root);
        }
    }
    return new PatchLocation(
            StandardLocation.PATCH_MODULE_PATH,
            bin,
            src,
            modName);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:PatchModuleFileManager.java

示例3: listLocationsForModules

@Override
public Iterable<Set<Location>> listLocationsForModules(Location location) throws IOException {
    if (location == StandardLocation.PATCH_MODULE_PATH) {
        return moduleLocations(location).stream()
                .map((ml) -> Collections.<Location>singleton(ml))
                .collect(Collectors.toList());
    } else {
        return Collections.emptyList();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:PatchModuleFileManager.java

示例4: moduleLocations

private Set<PatchLocation> moduleLocations(final Location baseLocation) {
    if (baseLocation != StandardLocation.PATCH_MODULE_PATH) {
        throw new IllegalStateException(baseLocation.toString());
    }
    if (moduleLocations == null) {
        Set<PatchLocation> res = new HashSet<>();
        for (Map.Entry<String,List<URL>> patch : patches.entrySet()) {
            res.add(createPatchLocation(patch.getKey(), patch.getValue()));
        }
        moduleLocations = Collections.unmodifiableSet(res);
    }
    return moduleLocations;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:PatchModuleFileManager.java

示例5: hasLocation

@Override
public boolean hasLocation(Location location) {
    return (StandardLocation.PATCH_MODULE_PATH == location || StandardLocation.CLASS_OUTPUT == location)
            && !patches.isEmpty();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:PatchModuleFileManager.java

示例6: hasLocation

@Override @DefinedBy(Api.COMPILER)
public boolean hasLocation(Location location) {
    return location == StandardLocation.PATCH_MODULE_PATH ||
           super.hasLocation(location);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:JavadocHelper.java

示例7: PatchModulesLocationHandler

PatchModulesLocationHandler() {
    super(StandardLocation.PATCH_MODULE_PATH, Option.PATCH_MODULE);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:3,代码来源:Locations.java

示例8: hasLocation

@Override
public boolean hasLocation(Location location) {
    return super.hasLocation(location) || location == StandardLocation.PATCH_MODULE_PATH;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:InMemoryJavaCompiler.java


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