Package org.forgerock.json.ref
Class JsonReference
java.lang.Object
org.forgerock.json.ref.JsonReference
Represents a JSON Reference value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromJsonValue(JsonValue value) Initializes this object from a$refJSON object value.getURI()Returns the URI of the value being referenced.static booleanisJsonReference(JsonValue value) Returnstrueif the specified JSON value contains a valid$refJSON object structure.Sets the URI of the value being referenced.Returns this object as a$refJSON object value.
-
Constructor Details
-
JsonReference
public JsonReference()Constructs an empty JSON Reference object.
-
-
Method Details
-
isJsonReference
Returnstrueif the specified JSON value contains a valid$refJSON object structure.- Parameters:
value- the value to test for a JSON Reference.- Returns:
trueif the value is a$refJSON Reference.
-
getURI
Returns the URI of the value being referenced.- Returns:
- The URI.
-
setURI
Sets the URI of the value being referenced.- Parameters:
uri- the URI of the value being referenced.- Returns:
- this object.
-
fromJsonValue
Initializes this object from a$refJSON object value.- Parameters:
value- a JSON value containing a$refmember.- Returns:
- this object.
- Throws:
JsonValueException- if the specified value is malformed.NullPointerException- ifvalueisnull.
-
toJsonValue
Returns this object as a$refJSON object value.- Returns:
- The value.
-