Class SafeConstructor

    • Field Detail

      • BOOL_VALUES

        private static final java.util.Map<java.lang.String,​java.lang.Boolean> BOOL_VALUES
      • RADIX_MAX

        private static final int[][] RADIX_MAX
      • TIMESTAMP_REGEXP

        private static final java.util.regex.Pattern TIMESTAMP_REGEXP
      • YMD_REGEXP

        private static final java.util.regex.Pattern YMD_REGEXP
    • Constructor Detail

      • SafeConstructor

        @Deprecated
        public SafeConstructor()
        Deprecated.
        use options
      • SafeConstructor

        public SafeConstructor​(LoaderOptions loadingConfig)
    • Method Detail

      • flattenMapping

        protected void flattenMapping​(MappingNode node)
      • flattenMapping

        protected void flattenMapping​(MappingNode node,
                                      boolean forceStringKeys)
      • processDuplicateKeys

        protected void processDuplicateKeys​(MappingNode node)
      • processDuplicateKeys

        protected void processDuplicateKeys​(MappingNode node,
                                            boolean forceStringKeys)
      • mergeNode

        private java.util.List<NodeTuple> mergeNode​(MappingNode node,
                                                    boolean isPreffered,
                                                    java.util.Map<java.lang.Object,​java.lang.Integer> key2index,
                                                    java.util.List<NodeTuple> values,
                                                    boolean forceStringKeys)
        Does merge for supplied mapping node.
        Parameters:
        node - where to merge
        isPreffered - true if keys of node should take precedence over others...
        key2index - maps already merged keys to index from values
        values - collects merged NodeTuple
        Returns:
        list of the merged NodeTuple (to be set as value for the MappingNode)
      • constructMapping2ndStep

        protected void constructMapping2ndStep​(MappingNode node,
                                               java.util.Map<java.lang.Object,​java.lang.Object> mapping)
        Description copied from class: BaseConstructor
        Fill provided Map with constructed data
        Overrides:
        constructMapping2ndStep in class BaseConstructor
        Parameters:
        node - - source
        mapping - - map to fill
      • maxLen

        private static int maxLen​(int max,
                                  int radix)
      • maxLen

        private static int maxLen​(long max,
                                  int radix)
      • createNumber

        private java.lang.Number createNumber​(int sign,
                                              java.lang.String number,
                                              int radix)
      • createLongOrBigInteger

        protected static java.lang.Number createLongOrBigInteger​(java.lang.String number,
                                                                 int radix)