@@ -562,6 +562,8 @@ public abstract WritableObjectId findObjectId(Object forPojo,
562
562
* sequence. This method is mostly used for root-level serializer
563
563
* handling to allow for simpler caching. A call can always be replaced
564
564
* by equivalent calls to access serializer and type serializer separately.
565
+ * Note: contextualization (call to {@link ValueSerializer#createContextual}) is done
566
+ * before returning the {@link ValueSerializer}.
565
567
*
566
568
* @param rawType Type for purpose of locating a serializer; usually dynamic
567
569
* runtime type, but can also be static declared type, depending on configuration
@@ -595,6 +597,8 @@ public ValueSerializer<Object> findTypedValueSerializer(Class<?> rawType,
595
597
* sequence. This method is mostly used for root-level serializer
596
598
* handling to allow for simpler caching. A call can always be replaced
597
599
* by equivalent calls to access serializer and type serializer separately.
600
+ * Note: contextualization (call to {@link ValueSerializer#createContextual}) is done
601
+ * before returning the {@link ValueSerializer}.
598
602
*
599
603
* @param valueType Declared type of value being serialized (which may not
600
604
* be actual runtime type); used for finding both value serializer and
@@ -626,6 +630,8 @@ public ValueSerializer<Object> findTypedValueSerializer(JavaType valueType, bool
626
630
* property. This is most often used for root-level values (when writing
627
631
* sequences), but may sometimes be used for more esoteric value handling for
628
632
* delegation.
633
+ * Note: contextualization (call to {@link ValueSerializer#createContextual}) is done
634
+ * before returning the {@link ValueSerializer}.
629
635
*
630
636
* @since 3.0
631
637
*/
@@ -648,6 +654,8 @@ public ValueSerializer<Object> findRootValueSerializer(Class<?> rawType)
648
654
* property. This is most often used for root-level values (when writing
649
655
* sequences), but may sometimes be used for more esoteric value handling for
650
656
* delegation.
657
+ * Note: contextualization (call to {@link ValueSerializer#createContextual}) is done
658
+ * before returning the {@link ValueSerializer}.
651
659
*
652
660
* @since 3.0
653
661
*/
@@ -671,6 +679,8 @@ public ValueSerializer<Object> findRootValueSerializer(JavaType valueType)
671
679
* handling value of the property). Difference (if any) has to do with contextual resolution,
672
680
* and method(s) called: this method should only be called when caller is
673
681
* certain that this is the primary property value serializer.
682
+ * Contextualization (call to {@link ValueSerializer#createContextual(SerializationContext, BeanProperty)}
683
+ * will be done before returning the {@link ValueSerializer}.
674
684
*
675
685
* @param property Property that is being handled; will never be null, and its
676
686
* type has to match <code>valueType</code> parameter.
@@ -685,6 +695,9 @@ public ValueSerializer<Object> findPrimaryPropertySerializer(JavaType valueType,
685
695
return handlePrimaryContextualization (ser , property );
686
696
}
687
697
698
+ /**
699
+ * @see #findPrimaryPropertySerializer(JavaType, BeanProperty)
700
+ */
688
701
public ValueSerializer <Object > findPrimaryPropertySerializer (Class <?> rawType ,
689
702
BeanProperty property )
690
703
{
@@ -745,9 +758,7 @@ public ValueSerializer<Object> findContentValueSerializer(Class<?> rawType,
745
758
*/
746
759
747
760
/**
748
- * Method variant used when we do NOT want contextualization to happen; it will need
749
- * to be handled at a later point, but caller wants to be able to do that
750
- * as needed; sometimes to avoid infinite loops
761
+ * @see #findValueSerializer(JavaType)
751
762
*/
752
763
public ValueSerializer <Object > findValueSerializer (Class <?> rawType )
753
764
{
@@ -764,8 +775,9 @@ public ValueSerializer<Object> findValueSerializer(Class<?> rawType)
764
775
765
776
/**
766
777
* Method variant used when we do NOT want contextualization to happen; it will need
767
- * to be handled at a later point, but caller wants to be able to do that
768
- * as needed; sometimes to avoid infinite loops
778
+ * to be done at a later point (many serializers are not in operational state before
779
+ * contextualization, call to {@link ValueSerializer#createContextual(SerializationContext, BeanProperty)}),
780
+ * but caller wants to be able to do that at a later point; sometimes to avoid infinite loops
769
781
*/
770
782
public ValueSerializer <Object > findValueSerializer (JavaType valueType )
771
783
{
0 commit comments