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


Java LatestStrategy类代码示例

本文整理汇总了Java中org.apache.ivy.plugins.latest.LatestStrategy的典型用法代码示例。如果您正苦于以下问题:Java LatestStrategy类的具体用法?Java LatestStrategy怎么用?Java LatestStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public LatestStrategy getLatestStrategy() {
    if (latestStrategy == null) {
        if (getSettings() == null) {
            throw new IllegalStateException(
                    "no ivy instance nor latest strategy configured in version range matcher "
                            + this);
        }
        if (latestStrategyName == null) {
            throw new IllegalStateException(
                    "null latest strategy defined in version range matcher " + this);
        }
        latestStrategy = getSettings().getLatestStrategy(latestStrategyName);
        if (latestStrategy == null) {
            throw new IllegalStateException("unknown latest strategy '" + latestStrategyName
                    + "' configured in version range matcher " + this);
        }
    }
    return latestStrategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:20,代码来源:VersionRangeMatcher.java

示例2: getLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public synchronized LatestStrategy getLatestStrategy(String name) {
    if ("default".equals(name)) {
        return getDefaultLatestStrategy();
    }
    LatestStrategy strategy = latestStrategies.get(name);
    if (workspaceResolver != null && !(strategy instanceof WorkspaceLatestStrategy)) {
        strategy = new WorkspaceLatestStrategy(strategy);
        latestStrategies.put(name, strategy);
    }
    return strategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:12,代码来源:IvySettings.java

示例3: getDefaultLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public synchronized LatestStrategy getDefaultLatestStrategy() {
    if (defaultLatestStrategy == null) {
        defaultLatestStrategy = new LatestRevisionStrategy();
    }
    if (workspaceResolver != null
            && !(defaultLatestStrategy instanceof WorkspaceLatestStrategy)) {
        defaultLatestStrategy = new WorkspaceLatestStrategy(defaultLatestStrategy);
    }
    return defaultLatestStrategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:11,代码来源:IvySettings.java

示例4: setLatestIfRequired

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
private LatestStrategy setLatestIfRequired(DependencyResolver resolver,
        LatestStrategy latestStrategy) {
    String latestName = getLatestStrategyName(resolver);
    if (latestName != null && !"default".equals(latestName)) {
        LatestStrategy oldLatest = getLatest(resolver);
        setLatest(resolver, latestStrategy);
        return oldLatest;
    } else {
        return null;
    }
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:12,代码来源:ChainResolver.java

示例5: getLatest

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
private static LatestStrategy getLatest(DependencyResolver resolver) {
    if (resolver instanceof HasLatestStrategy) {
        HasLatestStrategy r = (HasLatestStrategy) resolver;
        return r.getLatestStrategy();
    }
    return null;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:8,代码来源:ChainResolver.java

示例6: getStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public LatestStrategy getStrategy() {
    if (strategy == null) {
        if (strategyName != null) {
            strategy = getSettings().getLatestStrategy(strategyName);
            if (strategy == null) {
                Message.error("unknown latest strategy: " + strategyName);
                strategy = getSettings().getDefaultLatestStrategy();
            }
        } else {
            strategy = getSettings().getDefaultLatestStrategy();
        }
    }
    return strategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:15,代码来源:LatestConflictManager.java

示例7: getLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public LatestStrategy getLatestStrategy() {
    throw new UnsupportedOperationException("getLatestStrategy");
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:4,代码来源:LegacyDependencyResolver.java

示例8: setLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public void setLatestStrategy(LatestStrategy latestStrategy) {
    throw new UnsupportedOperationException("setLatestStrategy");
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:4,代码来源:LegacyDependencyResolver.java

示例9: addConfigured

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public synchronized void addConfigured(LatestStrategy latest) {
    addLatestStrategy(latest.getName(), latest);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:IvySettings.java

示例10: addLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public synchronized void addLatestStrategy(String name, LatestStrategy latest) {
    init(latest);
    latestStrategies.put(name, latest);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:5,代码来源:IvySettings.java

示例11: setDefaultLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public synchronized void setDefaultLatestStrategy(LatestStrategy defaultLatestStrategy) {
    this.defaultLatestStrategy = defaultLatestStrategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:IvySettings.java

示例12: VersionRangeMatcher

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public VersionRangeMatcher(String name, LatestStrategy strategy) {
    super(name);
    this.latestStrategy = strategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:5,代码来源:VersionRangeMatcher.java

示例13: setLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public void setLatestStrategy(LatestStrategy latestStrategy) {
    this.latestStrategy = latestStrategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:VersionRangeMatcher.java

示例14: setLatest

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
private static void setLatest(DependencyResolver resolver, LatestStrategy latest) {
    if (resolver instanceof HasLatestStrategy) {
        HasLatestStrategy r = (HasLatestStrategy) resolver;
        r.setLatestStrategy(latest);
    }
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:7,代码来源:ChainResolver.java

示例15: getLatestStrategy

import org.apache.ivy.plugins.latest.LatestStrategy; //导入依赖的package包/类
public LatestStrategy getLatestStrategy() {
    if (latestStrategy == null) {
        initLatestStrategyFromSettings();
    }
    return latestStrategy;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:7,代码来源:AbstractResolver.java


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