Class SafeConstructor

java.lang.Object
org.yaml.snakeyaml.constructor.BaseConstructor
org.yaml.snakeyaml.constructor.SafeConstructor
Direct Known Subclasses:
Constructor

public class SafeConstructor extends BaseConstructor
Construct standard Java classes
  • Field Details

    • undefinedConstructor

      public static final SafeConstructor.ConstructUndefined undefinedConstructor
    • BOOL_VALUES

      private static final Map<String,Boolean> BOOL_VALUES
    • RADIX_MAX

      private static final int[][] RADIX_MAX
    • TIMESTAMP_REGEXP

      private static final Pattern TIMESTAMP_REGEXP
    • YMD_REGEXP

      private static final Pattern YMD_REGEXP
  • Constructor Details

    • SafeConstructor

      public SafeConstructor()
    • SafeConstructor

      public SafeConstructor(LoaderOptions loadingConfig)
  • Method Details

    • flattenMapping

      protected void flattenMapping(MappingNode node)
    • processDuplicateKeys

      protected void processDuplicateKeys(MappingNode node)
    • mergeNode

      private List<NodeTuple> mergeNode(MappingNode node, boolean isPreffered, Map<Object,Integer> key2index, List<NodeTuple> values)
      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, Map<Object,Object> mapping)
      Overrides:
      constructMapping2ndStep in class BaseConstructor
    • constructSet2ndStep

      protected void constructSet2ndStep(MappingNode node, Set<Object> set)
      Overrides:
      constructSet2ndStep in class BaseConstructor
    • maxLen

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

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

      private Number createNumber(int sign, String number, int radix)
    • createLongOrBigInteger

      protected static Number createLongOrBigInteger(String number, int radix)