本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例7: getLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public LatestStrategy getLatestStrategy() {
throw new UnsupportedOperationException("getLatestStrategy");
}
示例8: setLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public void setLatestStrategy(LatestStrategy latestStrategy) {
throw new UnsupportedOperationException("setLatestStrategy");
}
示例9: addConfigured
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public synchronized void addConfigured(LatestStrategy latest) {
addLatestStrategy(latest.getName(), latest);
}
示例10: addLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public synchronized void addLatestStrategy(String name, LatestStrategy latest) {
init(latest);
latestStrategies.put(name, latest);
}
示例11: setDefaultLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public synchronized void setDefaultLatestStrategy(LatestStrategy defaultLatestStrategy) {
this.defaultLatestStrategy = defaultLatestStrategy;
}
示例12: VersionRangeMatcher
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public VersionRangeMatcher(String name, LatestStrategy strategy) {
super(name);
this.latestStrategy = strategy;
}
示例13: setLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public void setLatestStrategy(LatestStrategy latestStrategy) {
this.latestStrategy = latestStrategy;
}
示例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);
}
}
示例15: getLatestStrategy
import org.apache.ivy.plugins.latest.LatestStrategy; //導入依賴的package包/類
public LatestStrategy getLatestStrategy() {
if (latestStrategy == null) {
initLatestStrategyFromSettings();
}
return latestStrategy;
}