Skip to content

Commit 9cfcf8d

Browse files
committed
Javadoc fix for #3076
1 parent eb3ebd9 commit 9cfcf8d

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

src/main/java/com/fasterxml/jackson/databind/annotation/JsonDeserialize.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* Depending on what is annotated,
5050
* value is either an instance of annotated class (used globablly
5151
* anywhere where class deserializer is needed); or only used for
52-
* deserializing property access via a setter method.
52+
* deserializing the value of the property annotated.
5353
*/
5454
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
5555
public Class<? extends JsonDeserializer> using()
@@ -58,18 +58,22 @@ public Class<? extends JsonDeserializer> using()
5858
/**
5959
* Deserializer class to use for deserializing contents (elements
6060
* of a Collection/array, values of Maps) of annotated property.
61-
* Can only be used on instances (methods, fields, constructors),
62-
* and not value classes themselves.
61+
* Can only be used on accessors (methods, fields, constructors), to
62+
* apply to values of {@link java.util.Map}-valued properties; not
63+
* applicable for value types used as Array elements
64+
* or {@link java.util.Collection} and {@link java.util.Map} values.
6365
*/
6466
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
6567
public Class<? extends JsonDeserializer> contentUsing()
6668
default JsonDeserializer.None.class;
6769

6870
/**
6971
* Deserializer class to use for deserializing Map keys
70-
* of annotated property.
71-
* Can only be used on instances (methods, fields, constructors),
72-
* and not value classes themselves.
72+
* of annotated property or Map keys of value type so annotated.
73+
* Can be used both on accessors (methods, fields, constructors), to
74+
* apply to values of {@link java.util.Map}-valued properties, and
75+
* on "key" classes, to apply to use of annotated type as
76+
* {@link java.util.Map} keys (latter starting with Jackson 2.11).
7377
*/
7478
public Class<? extends KeyDeserializer> keyUsing()
7579
default KeyDeserializer.None.class;

src/main/java/com/fasterxml/jackson/databind/annotation/JsonSerialize.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,30 @@
3838
* serializing associated value. Depending on what is annotated,
3939
* value is either an instance of annotated class (used globablly
4040
* anywhere where class serializer is needed); or only used for
41-
* serializing property access via a getter method.
41+
* serializing the value of the property annotated.
4242
*/
4343
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
4444
public Class<? extends JsonSerializer> using() default JsonSerializer.None.class;
4545

4646
/**
4747
* Serializer class to use for serializing contents (elements
4848
* of a Collection/array, values of Maps) of annotated property.
49-
* Can only be used on properties (methods, fields, constructors),
50-
* and not value classes themselves (as they are typically generic)
49+
* Can only be used on accessors (methods, fields, constructors), to
50+
* apply to values of {@link java.util.Map}-valued properties; not
51+
* applicable for value types used as Array elements
52+
* or {@link java.util.Collection} and {@link java.util.Map} values.
5153
*/
5254
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
5355
public Class<? extends JsonSerializer> contentUsing()
5456
default JsonSerializer.None.class;
5557

5658
/**
57-
* Serializer class to use for serializing Map keys
58-
* of annotated property.
59-
* Can only be used on properties (methods, fields, constructors),
60-
* and not value classes themselves.
59+
* Serializer class to use for deserializing Map keys
60+
* of annotated property or Map keys of value type so annotated.
61+
* Can be used both on accessors (methods, fields, constructors), to
62+
* apply to values of {@link java.util.Map}-valued properties, and
63+
* on "key" classes, to apply to use of annotated type as
64+
* {@link java.util.Map} keys (latter starting with Jackson 2.11).
6165
*/
6266
@SuppressWarnings("rawtypes") // to work around JDK8 bug wrt Class-valued annotation properties
6367
public Class<? extends JsonSerializer> keyUsing()

0 commit comments

Comments
 (0)