@@ -1398,14 +1398,18 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated
1398
1398
}
1399
1399
1400
1400
/**
1401
- * Method called to check if introspector is able to detect so-called Primary
1402
- * Creator: Creator to select for use when no explicit annotation is found
1403
- * (via {@link #findCreatorAnnotation}).
1404
- * This is the case for example for Java Record types which have so-called
1405
- * canonical constructor; but it is also true for various "Data" classes by frameworks
1406
- * like Lombok and JVM languages like Kotlin and Scala (case classes).
1401
+ * Method called to check if introspector can find a Creator it considers
1402
+ * the "Default Creator": Creator to use as the primary, when no Creator has
1403
+ * explicit annotation ({@link #findCreatorAnnotation} returns {@code null}).
1404
+ * Examples of default creators include the canonical constructor defined by
1405
+ * Java Records; "Data" classes by frameworks
1406
+ * like Lombok and JVM languages like Kotlin and Scala (case classes) also have
1407
+ * similar concepts.
1407
1408
* If introspector can determine that one of given {@link PotentialCreator}s should
1408
- * be considered Primary, it should return it; if not, should return {@code null}.
1409
+ * be considered the default, it should return it; if not, should return {@code null}.
1410
+ * Note that core databind functionality may call this method even in the presence of
1411
+ * explicitly annotated creators; and may or may not use Creator returned depending
1412
+ * on other criteria.
1409
1413
*<p>
1410
1414
* NOTE: when returning chosen Creator, it may be necessary to mark its "mode"
1411
1415
* with {@link PotentialCreator#overrideMode} (especially for "delegating" creators).
@@ -1414,16 +1418,16 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated
1414
1418
* as the Primary creator is handled directly by {@link POJOPropertiesCollector}
1415
1419
*
1416
1420
* @param config Configuration settings in effect (for deserialization)
1417
- * @param valueClass Class being instantiated and defines Creators passed
1421
+ * @param valueClass Class being instantiated; defines Creators passed
1418
1422
* @param declaredConstructors Constructors value class declares
1419
1423
* @param declaredFactories Factory methods value class declares
1420
1424
*
1421
- * @return The one Canonical Creator to use for {@code valueClass}, if it can be
1425
+ * @return Default Creator to possibly use for {@code valueClass}, if one can be
1422
1426
* determined; {@code null} if not.
1423
1427
*
1424
1428
* @since 2.18
1425
1429
*/
1426
- public PotentialCreator findPrimaryCreator (MapperConfig <?> config ,
1430
+ public PotentialCreator findDefaultCreator (MapperConfig <?> config ,
1427
1431
AnnotatedClass valueClass ,
1428
1432
List <PotentialCreator > declaredConstructors ,
1429
1433
List <PotentialCreator > declaredFactories ) {
0 commit comments