Skip to content

Commit 71a3d83

Browse files
committed
javadoc improvement
1 parent 851debd commit 71a3d83

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/main/java/com/fasterxml/jackson/databind/JsonNode.java

+28
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,16 @@ public Iterator<String> fieldNames() {
177177
return EmptyIterator.instance();
178178
}
179179

180+
/**
181+
* Method for locating node specified by given JSON pointer instances.
182+
* Method will never return null; if no matching node exists,
183+
* will return a node for which {@link #isMissingNode()} returns true.
184+
*
185+
* @return Node that matches given JSON Pointer: if no match exists,
186+
* will return a node for which {@link #isMissingNode()} returns true.
187+
*
188+
* @since 2.3
189+
*/
180190
@Override
181191
public final JsonNode at(JsonPointer ptr)
182192
{
@@ -191,6 +201,24 @@ public final JsonNode at(JsonPointer ptr)
191201
return n.at(ptr.tail());
192202
}
193203

204+
/**
205+
* Convenience method that is functionally equivalent to:
206+
*<pre>
207+
* return at(JsonPointer.valueOf(jsonPointerExpression));
208+
*</pre>
209+
*<p>
210+
* Note that if the same expression is used often, it is preferable to construct
211+
* {@link JsonPointer} instance once and reuse it: this method will not perform
212+
* any caching of compiled expressions.
213+
*
214+
* @param jsonPtrExpr Expression to compile as a {@link JsonPointer}
215+
* instance
216+
*
217+
* @return Node that matches given JSON Pointer: if no match exists,
218+
* will return a node for which {@link TreeNode#isMissingNode()} returns true.
219+
*
220+
* @since 2.3
221+
*/
194222
@Override
195223
public final JsonNode at(String jsonPtrExpr) {
196224
return at(JsonPointer.compile(jsonPtrExpr));

0 commit comments

Comments
 (0)