本文整理了Java中org.codehaus.jackson.Version.unknownVersion()
方法的一些代码示例,展示了Version.unknownVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.unknownVersion()
方法的具体详情如下:
包路径:org.codehaus.jackson.Version
类名称:Version
方法名:unknownVersion
[英]Method returns canonical "not known" version, which is used as version in cases where actual version information is not known (instead of null).
[中]方法返回规范的“未知”版本,在实际版本信息未知(而不是null)的情况下,该版本用作版本。
代码示例来源:origin: org.codehaus.jackson/jackson-core-asl
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: org.codehaus.jackson/jackson-core-asl
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: org.codehaus.jackson/jackson-core-asl
/**
* Helper method that will try to load version information for specified
* class. Implementation is simple: class loader that loaded specified
* class is asked to load resource with name "VERSION" from same
* location (package) as class itself had.
* If no version information is found, {@link Version#unknownVersion()} is
* returned.
*/
public static Version versionFor(Class<?> cls)
{
InputStream in;
Version version = null;
try {
in = cls.getResourceAsStream(VERSION_FILE);
if (in != null) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
version = parseVersion(br.readLine());
} finally {
try {
in.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
} catch (IOException e) { }
return (version == null) ? Version.unknownVersion() : version;
}
代码示例来源:origin: alibaba/nacos
this.version = Version.unknownVersion();
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Helper method that will try to load version information for specified
* class. Implementation is simple: class loader that loaded specified
* class is asked to load resource with name "VERSION" from same
* location (package) as class itself had.
* If no version information is found, {@link Version#unknownVersion()} is
* returned.
*/
public static Version versionFor(Class<?> cls)
{
InputStream in;
Version version = null;
try {
in = cls.getResourceAsStream(VERSION_FILE);
if (in != null) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
version = parseVersion(br.readLine());
} finally {
try {
in.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
} catch (IOException e) { }
return (version == null) ? Version.unknownVersion() : version;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
/**
* @since 1.6
*/
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
/**
* @since 1.6
*/
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
/**
* @since 1.6
*/
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: com.plausiblelabs.warwizard/warwizard-core
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: com.plausiblelabs.warwizard/warwizard-core
@Override
public Version version() {
return Version.unknownVersion();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
/**
* Helper method that will try to load version information for specified
* class. Implementation is simple: class loader that loaded specified
* class is asked to load resource with name "VERSION" from same
* location (package) as class itself had.
* If no version information is found, {@link Version#unknownVersion()} is
* returned.
*/
public static Version versionFor(Class<?> cls)
{
InputStream in;
Version version = null;
try {
in = cls.getResourceAsStream(VERSION_FILE);
if (in != null) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
version = parseVersion(br.readLine());
} finally {
try {
in.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
} catch (IOException e) { }
return (version == null) ? Version.unknownVersion() : version;
}
代码示例来源:origin: com.barchart.wrap/barchart-wrap-jackson
/**
* Helper method that will try to load version information for specified
* class. Implementation is simple: class loader that loaded specified
* class is asked to load resource with name "VERSION" from same
* location (package) as class itself had.
* If no version information is found, {@link Version#unknownVersion()} is
* returned.
*/
public static Version versionFor(Class<?> cls)
{
InputStream in;
Version version = null;
try {
in = cls.getResourceAsStream(VERSION_FILE);
if (in != null) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
version = parseVersion(br.readLine());
} finally {
try {
in.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
} catch (IOException e) { }
return (version == null) ? Version.unknownVersion() : version;
}
代码示例来源:origin: org.eagle-i/eagle-i-datatools-catalyst
SimpleModule module = new SimpleModule("EIExchangeInstanceModule", Version.unknownVersion());
module.addDeserializer( EIExchangeInstance.class, new EIExchangeInstanceDeserializer() );
mapper.registerModule( module );
代码示例来源:origin: secdec/attack-surface-detector-burp
objectMapper.setVisibility(JsonMethod.ALL, JsonAutoDetect.Visibility.NONE);
objectMapper.setVisibility(JsonMethod.FIELD, JsonAutoDetect.Visibility.ANY);
SimpleModule module = new SimpleModule("RouteParameterDeserializer", Version.unknownVersion());
module.addDeserializer(RouteParameter.class, new RouteParameterDeserializer());
objectMapper.registerModule(module);
代码示例来源:origin: secdec/attack-surface-detector-burp
objectMapper.setVisibility(JsonMethod.ALL, JsonAutoDetect.Visibility.NONE);
objectMapper.setVisibility(JsonMethod.FIELD, JsonAutoDetect.Visibility.ANY);
SimpleModule module = new SimpleModule("RouteParameterDeserializer", Version.unknownVersion());
module.addDeserializer(RouteParameter.class, new RouteParameterDeserializer());
objectMapper.registerModule(module);
内容来源于网络,如有侵权,请联系作者删除!