com.fasterxml.jackson.core.Version.toString()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中com.fasterxml.jackson.core.Version.toString()方法的一些代码示例,展示了Version.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.toString()方法的具体详情如下:
包路径:com.fasterxml.jackson.core.Version
类名称:Version
方法名:toString

Version.toString介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: FasterXML/jackson-core

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: Nextdoor/bender

public String toFullString() {
  return _groupId + '/' + _artifactId + '/' + toString();
}

代码示例来源:origin: com.codahale.metrics/metrics-json

@Override
  public void serialize(MetricRegistry registry,
             JsonGenerator json,
             SerializerProvider provider) throws IOException {
    json.writeStartObject();
    json.writeStringField("version", VERSION.toString());
    json.writeObjectField("gauges", registry.getGauges());
    json.writeObjectField("counters", registry.getCounters());
    json.writeObjectField("histograms", registry.getHistograms());
    json.writeObjectField("meters", registry.getMeters());
    json.writeObjectField("timers", registry.getTimers());
    json.writeEndObject();
  }
}

代码示例来源:origin: io.dropwizard.metrics/metrics-json

@Override
  public void serialize(MetricRegistry registry,
             JsonGenerator json,
             SerializerProvider provider) throws IOException {
    json.writeStartObject();
    json.writeStringField("version", VERSION.toString());
    json.writeObjectField("gauges", registry.getGauges(filter));
    json.writeObjectField("counters", registry.getCounters(filter));
    json.writeObjectField("histograms", registry.getHistograms(filter));
    json.writeObjectField("meters", registry.getMeters(filter));
    json.writeObjectField("timers", registry.getTimers(filter));
    json.writeEndObject();
  }
}

代码示例来源:origin: org.apache.camel/camel-micrometer

@Override
public void serialize(MeterRegistry registry,
           JsonGenerator json,
           SerializerProvider provider) throws IOException {
  json.writeStartObject();
  json.writeStringField("version", VERSION.toString());
  json.writeObjectField("gauges", meters(registry, Gauge.class, matchingNames, matchingTags));
  json.writeObjectField("counters", meters(registry, Counter.class, matchingNames, matchingTags));
  json.writeObjectField("functionCounters", meters(registry, FunctionCounter.class, matchingNames, matchingTags));
  json.writeObjectField("timers", meters(registry, Timer.class, matchingNames, matchingTags));
  json.writeObjectField("functionTimers", meters(registry, FunctionTimer.class, matchingNames, matchingTags));
  json.writeObjectField("longTaskTimers", meters(registry, LongTaskTimer.class, matchingNames, matchingTags));
  json.writeObjectField("distributionSummaries", meters(registry, DistributionSummary.class, matchingNames, matchingTags));
  json.writeEndObject();
}

代码示例来源:origin: com.yammer.metrics/metrics-json

@Override
  public void serialize(MetricRegistry registry,
             JsonGenerator json,
             SerializerProvider provider) throws IOException {
    json.writeStartObject();
    json.writeStringField("name", registry.getName());
    json.writeStringField("version", VERSION.toString());
    json.writeObjectField("gauges", registry.getGauges());
    json.writeObjectField("counters", registry.getCounters());
    json.writeObjectField("histograms", registry.getHistograms());
    json.writeObjectField("meters", registry.getMeters());
    json.writeObjectField("timers", registry.getTimers());
    json.writeEndObject();
  }
}

代码示例来源:origin: de.digitalcollections.iiif/iiif-apis

private void checkJacksonVersion() {
 int neededMajor = 2;
 int neededMinor = 9;
 int currentMajor = this.version().getMajorVersion();
 int currentMinor = this.version().getMinorVersion();
 if (currentMajor < neededMajor || (currentMajor == neededMajor && currentMinor < neededMinor)) {
  throw new RuntimeException(
    String.format("iiif-apis requires Jackson >= 2.9.0. The version on your classpath is %s", this.version().toString()));
 }
}

相关文章