Class JsonReference

java.lang.Object
org.forgerock.json.ref.JsonReference

public class JsonReference extends Object
Represents a JSON Reference value.
  • Constructor Details

    • JsonReference

      public JsonReference()
      Constructs an empty JSON Reference object.
  • Method Details

    • isJsonReference

      public static boolean isJsonReference(JsonValue value)
      Returns true if the specified JSON value contains a valid $ref JSON object structure.
      Parameters:
      value - the value to test for a JSON Reference.
      Returns:
      true if the value is a $ref JSON Reference.
    • getURI

      public URI getURI()
      Returns the URI of the value being referenced.
      Returns:
      The URI.
    • setURI

      public JsonReference setURI(URI uri)
      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 $ref JSON object value.
      Parameters:
      value - a JSON value containing a $ref member.
      Returns:
      this object.
      Throws:
      JsonValueException - if the specified value is malformed.
      NullPointerException - if value is null.
    • toJsonValue

      Returns this object as a $ref JSON object value.
      Returns:
      The value.