本文整理了Java中org.apache.felix.ipojo.Factory.getVersion()
方法的一些代码示例,展示了Factory.getVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.getVersion()
方法的具体详情如下:
包路径:org.apache.felix.ipojo.Factory
类名称:Factory
方法名:getVersion
[英]Gets the version of the component type.
[中]获取组件类型的版本。
代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.composite
public String getVersion() {
return m_delegate.getVersion();
}
代码示例来源:origin: apache/felix
public String getVersion() {
return m_delegate.getVersion();
}
代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo
public String generate(Factory factory, List<String> reserved) throws UnacceptableConfiguration {
StringBuilder sb = new StringBuilder();
sb.append(factory.getName());
if (factory.getVersion() != null) {
sb.append("/");
sb.append(factory.getVersion());
}
sb.append("-");
sb.append(m_nextId.getAndIncrement());
return sb.toString();
}
}
代码示例来源:origin: apache/felix
public String generate(Factory factory, List<String> reserved) throws UnacceptableConfiguration {
StringBuilder sb = new StringBuilder();
sb.append(factory.getName());
if (factory.getVersion() != null) {
sb.append("/");
sb.append(factory.getVersion());
}
sb.append("-");
sb.append(m_nextId.getAndIncrement());
return sb.toString();
}
}
代码示例来源:origin: org.wisdom-framework/wisdom-monitor
/**
* @return the factory name (either name of name - version).
*/
public String getName() {
if (factory.getVersion() == null) {
return factory.getName();
} else {
return factory.getName() + " - " + factory.getVersion();
}
}
代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo
public String generate(final Factory factory, final List<String> reserved) throws UnacceptableConfiguration {
// Loop until we obtain a unique value (or counter overflow)
long counter = 0;
while (counter < maximum) {
String generated = m_delegate.generate(factory, reserved);
counter++;
// Verify uniqueness
if (!reserved.contains(generated)) {
return generated;
}
}
// Should never happen (except is NameGenerator composition is broken: like a delegate that
// never change its return value)
throw new UnacceptableConfiguration(format("Cannot generate unique instance name for factory %s/%s from bundle %d",
factory.getName(),
factory.getVersion(),
factory.getBundleContext().getBundle().getBundleId()));
}
}
代码示例来源:origin: apache/felix
public String generate(final Factory factory, final List<String> reserved) throws UnacceptableConfiguration {
// Loop until we obtain a unique value (or counter overflow)
long counter = 0;
while (counter < maximum) {
String generated = m_delegate.generate(factory, reserved);
counter++;
// Verify uniqueness
if (!reserved.contains(generated)) {
return generated;
}
}
// Should never happen (except is NameGenerator composition is broken: like a delegate that
// never change its return value)
throw new UnacceptableConfiguration(format("Cannot generate unique instance name for factory %s/%s from bundle %d",
factory.getName(),
factory.getVersion(),
factory.getBundleContext().getBundle().getBundleId()));
}
}
代码示例来源:origin: apache/felix
pw.array();
for (Factory factory : m_factories) {
String version = factory.getVersion();
String name = factory.getName();
内容来源于网络,如有侵权,请联系作者删除!