/** * Alias for {@link #compile}; added to make instances automatically * deserializable by Jackson databind. */ public static JsonPointer valueOf(String input) { return compile(input); }
public JsonPointerBasedFilter(String ptrExpr) { this(JsonPointer.compile(ptrExpr)); }
/** * Alias for {@link #compile}; added to make instances automatically * deserializable by Jackson databind. */ public static JsonPointer valueOf(String input) { return compile(input); }
public JsonPointerBasedFilter(String ptrExpr) { this(JsonPointer.compile(ptrExpr)); }
return compile(currentJsonPointer + tail._asString);
/** * Convenience method that is functionally equivalent to: *<pre> * return at(JsonPointer.valueOf(jsonPointerExpression)); *</pre> *<p> * Note that if the same expression is used often, it is preferable to construct * {@link JsonPointer} instance once and reuse it: this method will not perform * any caching of compiled expressions. * * @param jsonPtrExpr Expression to compile as a {@link JsonPointer} * instance * * @return Node that matches given JSON Pointer: if no match exists, * will return a node for which {@link TreeNode#isMissingNode()} returns true. * * @since 2.3 */ @Override public final JsonNode at(String jsonPtrExpr) { return at(JsonPointer.compile(jsonPtrExpr)); }
return compile(currentJsonPointer + tail._asString);
/** * Generates the path of {@link JsonPointer} of permission of the specified token {@code appId} * in the specified {@code repoName}. */ private static JsonPointer perTokenPermissionPointer(String repoName, String appId) { return JsonPointer.compile("/repos/" + repoName + "/perTokenPermissions/" + appId); } }
/** * Alias for {@link #compile}; added to make instances automatically * deserializable by Jackson databind. */ public static JsonPointer valueOf(String input) { return compile(input); }
/** * Alias for {@link #compile}; added to make instances automatically * deserializable by Jackson databind. */ public static JsonPointer valueOf(String input) { return compile(input); }
/** * Alias for {@link #compile}; added to make instances automatically * deserializable by Jackson databind. */ public static JsonPointer valueOf(String input) { return compile(input); }
public PathInfo(String pathString) { this.pathString = pathString; this.path = JsonPointer.compile(pathString); this.regex = Pattern.compile(pathString + "/([^/]+)"); }
@Override public JsonPointer getChildPointer() { if (currentIndex >= 0) { return ptr.append(JsonPointer.compile("/" + currentIndex)); } else { throw new IllegalStateException(); } }
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") private static Class<? extends AbstractPropertySelector> getSubtypeOf(JsonNode json) { switch(json.at(JsonPointer.compile("/_type")).asText()) { case "PropertyRealization": return PropertyRealization.class; case "PropertySelector": return PropertySelector.class; default: return null; } }
public PropertyLocator(String name, String path, JsonNode json) { this.name = name; this.pointer = JsonPointer.compile(path.isEmpty() ? "" : "/" + path); this.vector = computeVector(pointer, json); }
/** * Generates the path of {@link JsonPointer} of permission of the specified token {@code appId} * in the specified {@code repoName}. */ private static JsonPointer perTokenPermissionPointer(String repoName, String appId) { return JsonPointer.compile("/repos" + encodeSegment(repoName) + "/perTokenPermissions" + encodeSegment(appId)); } }
/** * Generates the path of {@link JsonPointer} of permission of the specified {@code memberId} in the * specified {@code repoName}. */ private static JsonPointer perUserPermissionPointer(String repoName, String memberId) { return JsonPointer.compile("/repos" + encodeSegment(repoName) + "/perUserPermissions" + encodeSegment(memberId)); }
/** * Generates the path of {@link JsonPointer} of permission of the specified token {@code appId} * in the specified {@code repoName}. */ private static JsonPointer perTokenPermissionPointer(String repoName, String appId) { return JsonPointer.compile("/repos" + encodeSegment(repoName) + "/perTokenPermissions" + encodeSegment(appId)); } }
/** * Generates the path of {@link JsonPointer} of permission of the specified {@code memberId} in the * specified {@code repoName}. */ private static JsonPointer perUserPermissionPointer(String repoName, String memberId) { return JsonPointer.compile("/repos" + encodeSegment(repoName) + "/perUserPermissions" + encodeSegment(memberId)); }
private <X> JsonOverlay<X> _addChild(String name, String path, OverlayFactory<X> factory) { JsonPointer pointer = JsonPointer.compile(path.isEmpty() ? "" : "/" + path); JsonNode childJson = json.at(pointer); JsonOverlay<X> child = factory.create(childJson, this, refMgr); child._setPathInParent(path); PropertyLocator locator = new PropertyLocator(name, path, json); childOrder.add(locator); children.put(name, child); return child; }