Skip to content

Commit 0035b4d

Browse files
committed
jdoc checkstyle
1 parent 6adab2d commit 0035b4d

File tree

9 files changed

+100
-10
lines changed

9 files changed

+100
-10
lines changed

src/main/java/org/htmlunit/WebWindowEvent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ public String toString() {
169169
return builder.toString();
170170
}
171171

172-
/** @return the event type */
172+
/**
173+
* @return the event type
174+
*/
173175
public int getEventType() {
174176
return type_;
175177
}

src/main/java/org/htmlunit/html/DomElement.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,13 +859,17 @@ protected ChildElementsIterator(final DomNode domNode) {
859859
}
860860
}
861861

862-
/** @return is there a next one ? */
862+
/**
863+
* @return is there a next one ?
864+
*/
863865
@Override
864866
public boolean hasNext() {
865867
return nextElement_ != null;
866868
}
867869

868-
/** @return the next one */
870+
/**
871+
* @return the next one
872+
*/
869873
@Override
870874
public DomElement next() {
871875
if (nextElement_ != null) {

src/main/java/org/htmlunit/html/DomNode.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,9 @@ public void remove() {
14341434
current.remove();
14351435
}
14361436

1437-
/** @return the next node, if there is one */
1437+
/**
1438+
* @return the next node, if there is one
1439+
*/
14381440
@SuppressWarnings("unchecked")
14391441
public T nextNode() {
14401442
currentNode_ = nextNode_;
@@ -1537,7 +1539,9 @@ public void remove() {
15371539
current.remove();
15381540
}
15391541

1540-
/** @return the next node, if there is one */
1542+
/**
1543+
* @return the next node, if there is one
1544+
*/
15411545
@SuppressWarnings("unchecked")
15421546
public DomNode nextNode() {
15431547
currentNode_ = nextNode_;
@@ -1638,7 +1642,9 @@ public void remove() {
16381642
current.remove();
16391643
}
16401644

1641-
/** @return the next node, if there is one */
1645+
/**
1646+
* @return the next node, if there is one
1647+
*/
16421648
@SuppressWarnings("unchecked")
16431649
public DomElement nextNode() {
16441650
currentNode_ = nextNode_;
@@ -1739,7 +1745,9 @@ public void remove() {
17391745
current.remove();
17401746
}
17411747

1742-
/** @return the next node, if there is one */
1748+
/**
1749+
* @return the next node, if there is one
1750+
*/
17431751
@SuppressWarnings("unchecked")
17441752
public HtmlElement nextNode() {
17451753
currentNode_ = nextNode_;

src/main/java/org/htmlunit/html/HtmlTableRow.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ public CellIterator() {
166166
setNextCell(getFirstChild());
167167
}
168168

169-
/** @return whether there is another cell available */
169+
/**
170+
* @return whether there is another cell available
171+
*/
170172
@Override
171173
public boolean hasNext() {
172174
return nextCell_ != null;

src/main/java/org/htmlunit/html/XmlSerializer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public class XmlSerializer {
5454
private final StringBuilder indent_ = new StringBuilder();
5555
private File outputDir_;
5656

57+
/**
58+
* Saves the given {@link SgmlPage} to the file.
59+
* @param page the page to save
60+
* @param file the destination
61+
* @throws IOException in case of error
62+
*/
5763
public void save(final SgmlPage page, final File file) throws IOException {
5864
save(page, file, false);
5965
}

src/main/java/org/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ class HtmlUnitNekoHTMLErrorHandler implements XMLErrorHandler {
315315
html_ = htmlContent;
316316
}
317317

318-
/** @see DefaultErrorHandler#error(String,String,XMLParseException) */
318+
/**
319+
* @see DefaultErrorHandler#error(String,String,XMLParseException)
320+
*/
319321
@Override
320322
public void error(final String domain, final String key,
321323
final XMLParseException exception) throws XNIException {
@@ -327,7 +329,9 @@ public void error(final String domain, final String key,
327329
key);
328330
}
329331

330-
/** @see DefaultErrorHandler#warning(String,String,XMLParseException) */
332+
/**
333+
* @see DefaultErrorHandler#warning(String,String,XMLParseException)
334+
*/
331335
@Override
332336
public void warning(final String domain, final String key,
333337
final XMLParseException exception) throws XNIException {

src/main/java/org/htmlunit/html/xpath/XPathHelper.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ public static <T> List<T> getByXPath(final DomNode contextNode, final String xpa
9292
}
9393
}
9494

95+
/**
96+
* @param <T> the type of nodes expected
97+
* @param node the start node
98+
* @param xpath the {@link XPathAdapter} to search for
99+
* @param prefixResolver the {@link PrefixResolver} to be used
100+
* @return a list of nodes matching the given xpath
101+
* @throws TransformerException in case of error
102+
*/
95103
public static <T> List<T> getByXPath(final Node node, final XPathAdapter xpath,
96104
final PrefixResolver prefixResolver) throws TransformerException {
97105
final List<T> list = new ArrayList<>();

src/main/java/org/htmlunit/javascript/host/URL.java

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ public String getHash() {
125125
return ref == null ? "" : "#" + ref;
126126
}
127127

128+
/**
129+
* Sets the {@code hash} property.
130+
* @param fragment the {@code hash} property
131+
*/
128132
@JsxSetter
129133
public void setHash(final String fragment) throws MalformedURLException {
130134
if (url_ == null) {
@@ -146,6 +150,10 @@ public String getHost() {
146150
return url_.getHost() + (port > 0 ? ":" + port : "");
147151
}
148152

153+
/**
154+
* Sets the {@code host} property.
155+
* @param host the {@code host} property
156+
*/
149157
@JsxSetter
150158
public void setHost(final String host) throws MalformedURLException {
151159
if (url_ == null) {
@@ -210,6 +218,10 @@ public String getHostname() {
210218
return UrlUtils.encodeAnchor(url_.getHost());
211219
}
212220

221+
/**
222+
* Sets the {@code hostname} property.
223+
* @param hostname the {@code hostname} property
224+
*/
213225
@JsxSetter
214226
public void setHostname(final String hostname) throws MalformedURLException {
215227
if (getBrowserVersion().hasFeature(JS_ANCHOR_HOSTNAME_IGNORE_BLANK)) {
@@ -234,6 +246,10 @@ public String getHref() {
234246
return jsToString();
235247
}
236248

249+
/**
250+
* Sets the {@code href} property.
251+
* @param href the {@code href} property
252+
*/
237253
@JsxSetter
238254
public void setHref(final String href) throws MalformedURLException {
239255
if (url_ == null) {
@@ -289,6 +305,10 @@ public String getPassword() {
289305
return idx == -1 ? "" : userInfo.substring(idx + 1);
290306
}
291307

308+
/**
309+
* Sets the {@code password} property.
310+
* @param password the {@code password} property
311+
*/
292312
@JsxSetter
293313
public void setPassword(final String password) throws MalformedURLException {
294314
if (url_ == null) {
@@ -311,6 +331,10 @@ public String getPathname() {
311331
return path.isEmpty() ? "/" : path;
312332
}
313333

334+
/**
335+
* Sets the {@code path} property.
336+
* @param path the {@code path} property
337+
*/
314338
@JsxSetter
315339
public void setPathname(final String path) throws MalformedURLException {
316340
if (url_ == null) {
@@ -334,6 +358,10 @@ public String getPort() {
334358
return port == -1 ? "" : Integer.toString(port);
335359
}
336360

361+
/**
362+
* Sets the {@code port} property.
363+
* @param port the {@code port} property
364+
*/
337365
@JsxSetter
338366
public void setPort(final String port) throws MalformedURLException {
339367
if (url_ == null) {
@@ -356,6 +384,10 @@ public String getProtocol() {
356384
return protocol.isEmpty() ? "" : (protocol + ":");
357385
}
358386

387+
/**
388+
* Sets the {@code protocol} property.
389+
* @param protocol the {@code protocol} property
390+
*/
359391
@JsxSetter
360392
public void setProtocol(final String protocol) throws MalformedURLException {
361393
if (url_ == null || protocol.isEmpty()) {
@@ -391,6 +423,10 @@ public String getSearch() {
391423
return search == null ? "" : "?" + search;
392424
}
393425

426+
/**
427+
* Sets the {@code search} property.
428+
* @param search the {@code search} property
429+
*/
394430
@JsxSetter
395431
public void setSearch(final String search) throws MalformedURLException {
396432
if (url_ == null) {
@@ -416,6 +452,11 @@ public void setSearch(final String search) throws MalformedURLException {
416452
url_ = UrlUtils.getUrlWithNewQuery(url_, query);
417453
}
418454

455+
/**
456+
* Sets the {@code search} property based on {@link NameValuePair}'s.
457+
* @param nameValuePairs the pairs
458+
* @throws MalformedURLException in case of error
459+
*/
419460
public void setSearch(final List<NameValuePair> nameValuePairs) throws MalformedURLException {
420461
final StringBuilder newSearch = new StringBuilder();
421462
for (final NameValuePair nameValuePair : nameValuePairs) {
@@ -448,6 +489,10 @@ public String getUsername() {
448489
return StringUtils.substringBefore(userInfo, ':');
449490
}
450491

492+
/**
493+
* Sets the {@code username} property.
494+
* @param username the {@code username} property
495+
*/
451496
@JsxSetter
452497
public void setUsername(final String username) throws MalformedURLException {
453498
if (url_ == null) {

src/main/java/org/htmlunit/util/geometry/Point2D.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,26 @@ public class Point2D {
2323
private final double myX_;
2424
private final double myY_;
2525

26+
/**
27+
* Ctor.
28+
* @param x x value
29+
* @param y y value
30+
*/
2631
public Point2D(final double x, final double y) {
2732
myX_ = x;
2833
myY_ = y;
2934
}
3035

36+
/**
37+
* @return the x value
38+
*/
3139
public double getX() {
3240
return myX_;
3341
}
3442

43+
/**
44+
* @return the y value
45+
*/
3546
public double getY() {
3647
return myY_;
3748
}

0 commit comments

Comments
 (0)