Skip to content

Commit 9498000

Browse files
committed
Javadoc
1 parent a2452f6 commit 9498000

File tree

9 files changed

+31
-5
lines changed

9 files changed

+31
-5
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ The <action> type attribute can be add,update,fix,remove.
100100
<action dev="ggregory" type="fix" due-to="step-security-bot, Gary Gregory">
101101
[StepSecurity] CI: Harden GitHub Actions #66.
102102
</action>
103+
<action dev="ggregory" type="fix" due-to="Gary Gregory">Add missing Javadoc.</action>
103104
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName.</action>
104105
<action dev="ggregory" type="fix" due-to="Gary Gregory">Add generics to JXPathContext.iterate(String).</action>
105106
<action dev="ggregory" type="fix" due-to="Gary Gregory">Add generics to JXPathContext.iteratePointers(String).</action>

src/main/java/org/apache/commons/jxpath/FunctionLibrary.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public class FunctionLibrary implements Functions {
3232
private final List<Functions> allFunctions = new ArrayList<>();
3333
private Map<String, Object> byNamespace;
3434

35+
/**
36+
* Constructs a new instance.
37+
*/
38+
public FunctionLibrary() {
39+
// empty
40+
}
41+
3542
/**
3643
* Add functions to the library
3744
*

src/main/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class NamespaceContext extends EvalContext {
3535
private NodePointer currentNodePointer;
3636

3737
/**
38+
* Constructs a new instance.
39+
*
3840
* @param parentContext represents the previous step on the path
3941
* @param nodeTest is the name of the namespace we are looking for
4042
*/

src/main/java/org/apache/commons/jxpath/ri/axes/RootContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
*/
3131
public class RootContext extends EvalContext {
3232

33+
/**
34+
* Unknown value marker.
35+
*/
3336
public static final Object UNKNOWN_VALUE = new Object();
37+
3438
private static final int MAX_REGISTER = 4;
3539
private final JXPathContextReferenceImpl jxpathContext;
3640
private final NodePointer pointer;

src/main/java/org/apache/commons/jxpath/ri/compiler/Expression.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ public void remove() {
124124
private boolean contextDependencyKnown = false;
125125
private boolean contextDependent;
126126

127+
/**
128+
* Constructs a new instance.
129+
*/
130+
public Expression() {
131+
// empty
132+
}
133+
127134
/**
128135
* Evaluates the expression. If the result is a node set, returns the first element of the node set.
129136
*

src/main/java/org/apache/commons/jxpath/ri/compiler/NodeNameTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.commons.jxpath.ri.QName;
2121

2222
/**
23+
* Node name test.
2324
*/
2425
public class NodeNameTest extends NodeTest {
2526

src/main/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.commons.jxpath.ri.Compiler;
2121

2222
/**
23+
* Node type test.
2324
*/
2425
public class NodeTypeTest extends NodeTest {
2526

src/main/java/org/apache/commons/jxpath/ri/compiler/ProcessingInstructionTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.commons.jxpath.ri.compiler;
1919

2020
/**
21+
* Processing instruction test.
2122
*/
2223
public class ProcessingInstructionTest extends NodeTest {
2324

src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,10 @@ public NodePointer getImmediateParentPointer() {
460460
}
461461

462462
/**
463-
* @see #getValuePointer()
463+
* Gets this instance by default, subclasses can return a pointer for the immediately contained value.
464+
*
464465
* @return NodePointer is either {@code this} or a pointer for the immediately contained value.
466+
* @see #getValuePointer()
465467
*/
466468
public NodePointer getImmediateValuePointer() {
467469
return this;
@@ -471,7 +473,7 @@ public NodePointer getImmediateValuePointer() {
471473
* If the pointer represents a collection, the index identifies an element of that collection. The default value of {@code index} is
472474
* {@code WHOLE_COLLECTION}, which just means that the pointer is not indexed at all. Note: the index on NodePointer starts with 0, not 1.
473475
*
474-
* @return int
476+
* @return the index.
475477
*/
476478
public int getIndex() {
477479
return index;
@@ -480,7 +482,7 @@ public int getIndex() {
480482
/**
481483
* If the pointer represents a collection (or collection element), returns the length of the collection. Otherwise returns 1 (even if the value is null).
482484
*
483-
* @return int
485+
* @return the length.
484486
*/
485487
public abstract int getLength();
486488

@@ -497,9 +499,9 @@ public Locale getLocale() {
497499
}
498500

499501
/**
500-
* Returns the name of this node. Can be null.
502+
* Gets the name of this node. Can be null.
501503
*
502-
* @return QName
504+
* @return QName The name of this node. Can be null.
503505
*/
504506
public abstract QName getName();
505507

0 commit comments

Comments
 (0)