Package org.bitbucket.bradleysmithllc.java_cl_parser.util

Examples of org.bitbucket.bradleysmithllc.java_cl_parser.util.RecursiveMap


  {
    Map<String, Object> smap = new HashMap<String, Object>();

    smap.put("hi", "hi");

    RecursiveMap rmap = new RecursiveMap(smap);

    Assert.assertEquals("hi", rmap.get("hi"));

    smap.put("hi2", "${hi}2");

    Assert.assertEquals("hi2", rmap.get("hi2"));

    smap.put("hi3", "${${hi}4}");
    smap.put("hi4", "hi4");

    Assert.assertEquals("hi4", rmap.get("hi3"));

    smap.put("hi5", 5);

    Assert.assertEquals(5, rmap.get("hi5"));

    smap.put("hi6", new StringBuffer("${hi}"));

    Assert.assertEquals("${hi}", rmap.get("hi6").toString());
  }
View Full Code Here


    smap.put("$PMSessionLogFile", "s_m_EXTRACT_EMPDATA_SRT2IO8V66_${$$POPULATION_DATE}.log");

    smap.put("$PMRootDir", "\\\\edwfiles\\ETLDevFiles");
    smap.put("$PMBadFileDir", "${$PMRootDir}\\data\\BadFiles\\\\${$$POPULATION_DATE}");

    RecursiveMap rmap = new RecursiveMap(smap);

    Assert.assertEquals("Dollar_hi", rmap.get("$hi"));
    Assert.assertEquals("Dollar_hi", rmap.get("$hi3"));
    Assert.assertEquals("s_m_EXTRACT_EMPDATA_SRT2IO8V66_20121231.log", rmap.get("$PMSessionLogFile"));
    Assert.assertEquals("\\\\edwfiles\\ETLDevFiles\\data\\BadFiles\\20121231", rmap.get("$PMBadFileDir"));
  }
View Full Code Here

    {
      smap.put("TOKEN_" + i, "${TOKEN_" + (i + 1) + "}");
    }
    smap.put("TOKEN_100", "Grandioseness");

    RecursiveMap rmap = new RecursiveMap(smap);

    for (int i = 0; i < 100; i++)
    {
      Assert.assertEquals("Grandioseness", rmap.get("TOKEN_" + i));
    }
  }
View Full Code Here

      // before continuing, check all valid and invalid combinations
      checkValidSets(validSets, optMap, obj, typeList);
      checkInValidSets(invalidSets, optMap, obj, typeList);

      RecursiveMap rmap = new RecursiveMap(valueMap);

      // run through all options and pass the values on with injection
      for (Data data : typeList)
      {
        Object value = rmap.get(data.clioption.name());
        Object val = resolveOptionValue(data, cl, (String) value, obj, typeList);

        if (data.setter != null && val != null)
        {
          try
View Full Code Here

TOP

Related Classes of org.bitbucket.bradleysmithllc.java_cl_parser.util.RecursiveMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.