本文整理汇总了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;
}