Package org.github.jamm

Examples of org.github.jamm.MemoryMeterTest$Parent


    raw.append("<root>");
    pretty.append("<root>");
    pretty.append(lf);
    final int depth = 40;
    int cnt = depth;
    Parent parent = root;
    StringBuilder indent = new StringBuilder();
    while (--cnt > 0) {
      Element emt = new Element("emt");
      parent.getContent().add(emt);
      parent = emt;
      raw.append("<emt>");
      indent.append("  ");
      pretty.append(indent.toString());
      pretty.append("<emt>");
      pretty.append(lf);
    }
   
    parent.getContent().add(new Element("bottom"));
    raw.append("<bottom />");
    pretty.append(indent.toString());
    pretty.append("  <bottom />");
    pretty.append(lf);
   
View Full Code Here


    protected void generateForeignMarkup(Element e, List foreignMarkup) {
        if (foreignMarkup != null) {
            Iterator elems = (Iterator) foreignMarkup.iterator();
            while (elems.hasNext()) {
                Element elem = (Element) elems.next();
                Parent parent = elem.getParent();
                if (parent != null) {
                    parent.removeContent(elem);
                }
                e.addContent(elem);
            }
        }
    }
View Full Code Here

    }

    protected void generateForeignMarkup(final Element element, final List<Element> foreignElements) {
        if (foreignElements != null) {
            for (final Element foreignElement : foreignElements) {
                final Parent parent = foreignElement.getParent();
                if (parent != null) {
                    parent.removeContent(foreignElement);
                }
                element.addContent(foreignElement);
            }
        }
    }
View Full Code Here

  }

  @Test
  public void testCircularDependencyPojos() {
    Parent parent = factory.manufacturePojo(Parent.class);
    Assert.assertNotNull("The parent pojo cannot be null!", parent);

    Child child = parent.getChild();
    Assert.assertNotNull("The child pojo cannot be null!", child);
  }
View Full Code Here

TOP

Related Classes of org.github.jamm.MemoryMeterTest$Parent

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.