MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / readValue

Method readValue

src/main/java/org/htmlunit/html/HtmlTextArea.java:103–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 private String readValue() {
104 final StringBuilder builder = new StringBuilder();
105 for (final DomNode node : getChildren()) {
106 if (node instanceof DomText text) {
107 builder.append(text.getData());
108 }
109 }
110 // if content starts with new line, it is ignored (=> for the parser?)
111 if (builder.length() != 0 && builder.charAt(0) == '\n') {
112 builder.deleteCharAt(0);
113 }
114 return builder.toString();
115 }
116
117 /**
118 * Sets the new value of this text area.

Callers 2

initDefaultValueMethod · 0.95
getTextMethod · 0.95

Calls 5

lengthMethod · 0.65
getChildrenMethod · 0.45
appendMethod · 0.45
getDataMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected