Class MarshallerUtil


  • public class MarshallerUtil
    extends java.lang.Object
    Utility class to use with marshaling.
    • Field Detail

      • entryContainsNullPredicate

        protected static java.util.function.Predicate<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entryContainsNullPredicate
        Predicate to test whether the Map.Entry contains null value.
    • Constructor Detail

      • MarshallerUtil

        public MarshallerUtil()
    • Method Detail

      • marshalMap

        public static java.util.List<KeyMapAdaptedEntryAdapter.KeyMapAdaptedEntry> marshalMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Converts map with String/Object pairs into a list of KeyMapAdaptedEntry
        Parameters:
        map - the source map to be converted
        Returns:
        List
      • isPrimitive

        protected static boolean isPrimitive​(java.lang.Object valueObj)
        Method tests whether the Object is a primitive type or a string.
        Parameters:
        valueObj - the Object to test
        Returns:
        true if the Object is a primitive type or a string, false otherwise.
      • isCollection

        protected static boolean isCollection​(java.lang.Object valueObj)
        Method tests whether the Object is a Collection.
        Parameters:
        valueObj - the Object to test
        Returns:
        true if the Object is a Collection, false otherwise.
      • isMap

        protected static boolean isMap​(java.lang.Object valueObj)
        Method tests whether the Object is a Map.
        Parameters:
        valueObj - the Object to test
        Returns:
        true if the Object is a Map, false otherwise.
      • convertNestedComponentToMap

        public static java.util.Map<java.lang.String,​java.lang.Object> convertNestedComponentToMap​(ComponentWsDTO componentDTO)