Skip to content

Commit 8b85d87

Browse files
Fixed Javadoc example for constructParametricType(Class<?>, Class<?>...) (#4969)
1 parent a3dd293 commit 8b85d87

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main/java/com/fasterxml/jackson/databind/type/TypeFactory.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,11 +1123,10 @@ public JavaType uncheckedSimpleType(Class<?> cls) {
11231123
/**
11241124
* Factory method for constructing {@link JavaType} that
11251125
* represents a parameterized type. For example, to represent
1126-
* type {@code List<Set<Integer>>}, you could
1126+
* type {@code Foo<Bar, Baz>}, you could
11271127
* call
11281128
*<pre>
1129-
* JavaType inner = TypeFactory.constructParametricType(Set.class, Integer.class);
1130-
* return TypeFactory.constructParametricType(List.class, inner);
1129+
* return typeFactory.constructParametricType(Foo.class, Bar.class, Baz.class);
11311130
*</pre>
11321131
*<p>
11331132
* NOTE: since 2.11.2 {@link TypeModifier}s ARE called on result (fix for [databind#2796])
@@ -1151,8 +1150,8 @@ public JavaType constructParametricType(Class<?> parametrized, Class<?>... param
11511150
* represents a parameterized type. For example, to represent
11521151
* type {@code List<Set<Integer>>}, you could
11531152
*<pre>
1154-
* JavaType inner = TypeFactory.constructParametricType(Set.class, Integer.class);
1155-
* return TypeFactory.constructParametricType(List.class, inner);
1153+
* JavaType inner = typeFactory.constructParametricType(Set.class, Integer.class);
1154+
* return typeFactory.constructParametricType(List.class, inner);
11561155
*</pre>
11571156
*<p>
11581157
* NOTE: since 2.11.2 {@link TypeModifier}s ARE called on result (fix for [databind#2796])
@@ -1174,7 +1173,7 @@ public JavaType constructParametricType(Class<?> rawType, JavaType... parameterT
11741173
* is useful if you already have the type's parameters such
11751174
* as those found on {@link JavaType}. For example, you could call
11761175
* <pre>
1177-
* return TypeFactory.constructParametricType(ArrayList.class, javaType.getBindings());
1176+
* return typeFactory.constructParametricType(ArrayList.class, javaType.getBindings());
11781177
* </pre>
11791178
* This effectively applies the parameterized types from one
11801179
* {@link JavaType} to another class.

0 commit comments

Comments
 (0)