From 8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Sun, 16 Feb 2020 15:17:20 +0100 Subject: @Jacksonized: modify builders that they can be used by Jackson --- .../fasterxml/jackson/annotation/JsonIgnoreProperties.java | 12 ++++++++++++ .../jackson/databind/annotation/JsonDeserialize.java | 12 ++++++++++++ .../jackson/databind/annotation/JsonPOJOBuilder.java | 10 ++++++++++ 3 files changed, 34 insertions(+) create mode 100644 test/stubs/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java create mode 100644 test/stubs/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java create mode 100644 test/stubs/com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.java (limited to 'test/stubs/com') diff --git a/test/stubs/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java b/test/stubs/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java new file mode 100644 index 00000000..c90ef914 --- /dev/null +++ b/test/stubs/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java @@ -0,0 +1,12 @@ +package com.fasterxml.jackson.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface JsonIgnoreProperties { + public boolean ignoreUnknown() default false; +} diff --git a/test/stubs/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java b/test/stubs/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java new file mode 100644 index 00000000..0964f82c --- /dev/null +++ b/test/stubs/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java @@ -0,0 +1,12 @@ +package com.fasterxml.jackson.databind.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface JsonDeserialize { + public Class builder() default Void.class; +} diff --git a/test/stubs/com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.java b/test/stubs/com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.java new file mode 100644 index 00000000..4906dc58 --- /dev/null +++ b/test/stubs/com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.java @@ -0,0 +1,10 @@ +package com.fasterxml.jackson.databind.annotation; + +import java.lang.annotation.*; + +@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface JsonPOJOBuilder { + public String buildMethodName() default "build"; + public String withPrefix() default "with"; +} -- cgit