Package org.wicketstuff.pageserializer.common.analyze

Examples of org.wicketstuff.pageserializer.common.analyze.ISerializedObjectTree


    return transformTree(tree);
  }

  public static ISerializedObjectTree transformTree(ISerializedObjectTree tree)
  {
    ISerializedObjectTree ret = tree;
    if (!tree.children().isEmpty())
    {
      List<ISerializedObjectTree> transformed = new ArrayList<ISerializedObjectTree>();
      for (ISerializedObjectTree t : tree.children())
      {
        transformed.add(transformTree(t));
      }

      TreeTypeMap typeMap = new TreeTypeMap(transformed);

      if (typeMap.hasLessEntries(transformed.size()))
      {
//        LOG.error("Compress {}",tree.type());
       
        List<ISerializedObjectTree> result = typeMap.compressedResult();
        ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), result);
//        new TreeSizeReport().process(tree);
//        new TreeSizeReport().process(ret);
      } else {
        if (!sameEntries(tree.children(), transformed)) {
          ret = new ImmutableTree(ret.id(), ret.type(), ret.label(), ret.size(), transformed);
        }
      }
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.pageserializer.common.analyze.ISerializedObjectTree

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.