Esempio n. 1
0
 /**
  * Replace whole of inside the tag by replacement.<br>
  * If this tag can not have String directory (ex. &lt;table&gt; tag), do nothing.
  *
  * @param replacement
  */
 public void replaceInner(String replacement) {
   ReplaceInnerUtil.replaceInner(this, replacement);
 }
Esempio n. 2
0
 /**
  * Replace whole of inside the tag by the whole elements of the list.<br>
  * If the element can not be use in this tag, There is a case that will be exclude.
  *
  * @param replacement
  */
 public void replaceInner(List<java.lang.Object> replacement) {
   ReplaceInnerUtil.replaceInner(this, replacement);
 }
Esempio n. 3
0
 /**
  * Replace whole of inside the tag by replacement.<br>
  * For various reasons, this method does NOT use deep copy of replacement.<br>
  * It is recommended to use copy(T) in method argument.
  *
  * <p>このタグの中身の全てをreplacementで完全に置換します。<br>
  * このメソッドではreplacementのディープコピーで置換するのではない点に注意してください。<br>
  * 他のメソッドとおなじようにディープコピーで置換するために、copy(T)を使って引数を渡すことを推奨します。 <b>recommended pattern.</b>
  *
  * <pre>
  * // div and p is instance of Div, p tag object.
  * Div div = TagCreator.div();
  * P p = TagCreator.p();
  * p.getContent().add("foo");
  * div.replaceInner(p.copy(P.class)); // *** using copy()
  * p.getContent().add("bar");
  * System.out.println(mixer2Engine.saveToString(div));
  * // you get &lt;div&gt;&lt;p&gt;foo&lt;/p&gt;&lt;/div&gt;
  * </pre>
  *
  * <b>anti pattern. use with caution.</b>
  *
  * <pre>
  * // divA and divB is instance of Div tag object.
  * Div div = TagCreator.div();
  * P p = TagCreator.p();
  * p.getContent().add("foo");
  * div.replaceInner(p); // *** without copy()
  * p.getContent().add("bar");
  * System.out.println(mixer2Engine.saveToString(div));
  * // you get &lt;div&gt;&lt;p&gt;foo bar&lt;/p&gt;&lt;/div&gt;
  * </pre>
  *
  * @param replacement
  */
 public <T extends AbstractJaxb> void replaceInner(T replacement) {
   ReplaceInnerUtil.replaceInner(this, replacement);
 }