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

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

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

Version.<init>介绍

暂无

代码示例

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

@Override
public Version version() {
  return new Version(1, 0, 0, "", "org.stagemonitor", "stagemonitor-requestmonitor");
}

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

@Override
public Version version() {
  return new Version(1, 0, 0, "", "org.stagemonitor", "stagemonitor-core");
}

代码示例来源:origin: zendesk/maxwell

@Override
public Version version() {
  return new Version(0, 1, 0, "", "com.zendesk", "maxwell");
}

代码示例来源:origin: spring-projects/spring-security

public CasJackson2Module() {
  super(CasJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null));
}

代码示例来源:origin: spring-projects/spring-security

public CoreJackson2Module() {
  super(CoreJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null));
}

代码示例来源:origin: org.springframework.security/spring-security-core

public CoreJackson2Module() {
  super(CoreJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null));
}

代码示例来源:origin: gchq/Gaffer

@Override
  public List<Module> getModules() {
    return Collections.singletonList(
        new SimpleModule(HyperLogLogPlusJsonConstants.HYPER_LOG_LOG_PLUS_SERIALISER_MODULE_NAME, new Version(1, 0, 0, null, null, null))
            .addSerializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonSerialiser())
            .addDeserializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonDeserialiser())
    );
  }
}

代码示例来源:origin: gchq/Gaffer

@Override
  public List<Module> getModules() {
    return Collections.singletonList(
        new SimpleModule(RoaringBitmapConstants.BITMAP_MODULE_NAME, new Version(1, 0, 0, null, null, null))
            .addSerializer(RoaringBitmap.class, new RoaringBitmapJsonSerialiser())
            .addDeserializer(RoaringBitmap.class, new RoaringBitmapJsonDeserialiser())
    );
  }
}

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

public static SimpleModule tuuidModule() {
  SimpleModule tuuidModule = new SimpleModule("TUUIDModule", new Version(1, 0, 0, null, "org.rapidoid", "rapidoid-commons"));
  tuuidModule.addSerializer(TUUID.class, new TUUIDSerializer());
  tuuidModule.addDeserializer(TUUID.class, new TUUIDDeserializer());
  return tuuidModule;
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

public static SimpleModule getSerializerModule() {
  SimpleModule module = new SimpleModule("VertexJSONSerializer", new Version(1, 0, 0, null, "com.fasterxml.jackson.module", "jackson-module-jaxb-annotations"));
  module.addSerializer(new GeometrySerializer());
  module.addSerializer(new CoordinateSerializer());
  module.addSerializer(new PackedCoordinateSequenceSerializer());
  return module;
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/** Create a module including the serializer and deserializer for local dates */
public static SimpleModule makeModule () {
  Version moduleVersion = new Version(1, 0, 0, null, null, null);
  SimpleModule module = new SimpleModule("LocalDate", moduleVersion);
  module.addSerializer(LocalDate.class, new JodaLocalDateSerializer());
  module.addDeserializer(LocalDate.class, new JodaLocalDateDeserializer());
  return module;
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/** Create a module including the serializer and deserializer for qualified mode sets */
  public static SimpleModule makeModule () {
    Version moduleVersion = new Version(1, 0, 0, null, null, null);
    SimpleModule module = new SimpleModule("QualifiedModeSet", moduleVersion);
    module.addSerializer(QualifiedModeSet.class, new QualifiedModeSetSerializer());
    module.addDeserializer(QualifiedModeSet.class, new QualifiedModeSetDeserializer());
    return module;
  }
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/** Create a module including the serializer and deserializer for local dates */
public static SimpleModule makeModule () {
  Version moduleVersion = new Version(1, 0, 0, null, null, null);
  SimpleModule module = new SimpleModule("TraverseModeSet", moduleVersion);
  module.addSerializer(TraverseModeSet.class, new TraverseModeSetSerializer());
  module.addDeserializer(TraverseModeSet.class, new TraverseModeSetDeserializer());
  return module;
}

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

/**
 * Method used by <code>PackageVersion</code> classes to decode version injected by Maven build.
 */
public static Version parseVersion(String s, String groupId, String artifactId)
{
  if (s != null && (s = s.trim()).length() > 0) {
    String[] parts = V_SEP.split(s);
    return new Version(parseVersionPart(parts[0]),
        (parts.length > 1) ? parseVersionPart(parts[1]) : 0,
        (parts.length > 2) ? parseVersionPart(parts[2]) : 0,
        (parts.length > 3) ? parts[3] : null,
        groupId, artifactId);
  }
  return Version.unknownVersion();
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/** This creates a Jackson module including both the serializer and deserializer for AgencyAndIds. */
public static SimpleModule makeModule () {
  Version moduleVersion = new Version(1, 0, 0, null, null, null);
  SimpleModule module = new SimpleModule("OTP", moduleVersion);
  module.addSerializer(FeedScopedId.class, new FeedScopedIdSerializer());
  module.addDeserializer(FeedScopedId.class, new FeedScopedIdDeserializer());
  // Map key (de)serializers are always separate from value ones, because they must be strings.
  module.addKeyDeserializer(FeedScopedId.class, new FeedScopedIdKeyDeserializer());
  return module;
}

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

/**
 * Method used by <code>PackageVersion</code> classes to decode version injected by Maven build.
 */
public static Version parseVersion(String s, String groupId, String artifactId)
{
  if (s != null && (s = s.trim()).length() > 0) {
    String[] parts = V_SEP.split(s);
    return new Version(parseVersionPart(parts[0]),
        (parts.length > 1) ? parseVersionPart(parts[1]) : 0,
        (parts.length > 2) ? parseVersionPart(parts[2]) : 0,
        (parts.length > 3) ? parts[3] : null,
        groupId, artifactId);
  }
  return Version.unknownVersion();
}

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

public static <T> ObjectReader getObjectReader(Class<T> type) {
  final ObjectReader objectReader;
  if (getMapper().version().compareTo(new Version(2, 6, 0, null, "com.fasterxml.jackson.core", "jackson-databind")) >= 0) {
    objectReader = getMapper().readerFor(type);
  } else {
    objectReader = getMapper().reader(type);
  }
  return objectReader;
}
private static class AfterburnerModuleRegisterer {

代码示例来源:origin: gchq/Gaffer

@Before
public void before() {
  mapper = new ObjectMapper();
  mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
  mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
  final SimpleModule module = new SimpleModule(HyperLogLogPlusJsonConstants.HYPER_LOG_LOG_PLUS_SERIALISER_MODULE_NAME, new Version(1, 0, 0, null));
  module.addSerializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonSerialiser());
  module.addDeserializer(HyperLogLogPlus.class, new HyperLogLogPlusJsonDeserialiser());
  mapper.registerModule(module);
}

代码示例来源:origin: twosigma/beakerx

@BeforeClass
public static void initClassStubData() {
 mapper = new ObjectMapper();
 combinedPlotSerializer = new CombinedPlotSerializer();
 SimpleModule module = new SimpleModule("ChartSerializer", new Version(1, 0, 0, null));
 module.addSerializer(XYChart.class, new XYChartSerializer());
 module.addSerializer(CombinedPlot.class, new CombinedPlotSerializer());
 mapper.registerModule(module);
}

代码示例来源:origin: spring-projects/spring-data-elasticsearch

/**
   * Creates a new {@link org.springframework.data.elasticsearch.core.geo.CustomGeoModule} registering serializers and deserializers for spring data commons geo-spatial types.
   */
  public CustomGeoModule() {

    super("Spring Data Elasticsearch Geo", new Version(1, 0, 0, null, "org.springframework.data.elasticsearch", "spring-data-elasticsearch-geo"));
    addSerializer(Point.class, new PointSerializer());
    addDeserializer(Point.class, new PointDeserializer());
  }
}

相关文章