當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。