AttributeReference class final
An attribute name or path expression identifying a value within an LDContext.
Applications are unlikely to need to use this type directly, but see below for details of the
attribute reference syntax used by methods like LDAttributesBuilder.privateAttributes
.
The string representation of an attribute reference in LaunchDarkly data uses the following syntax:
- If the first character is not a slash, the string is interpreted literally as an attribute name. An attribute name can contain any characters, but must not be empty.
- If the first character is a slash, the string is interpreted as a slash-delimited path where the first path component is an attribute name, and each subsequent path component is the name of a property in a JSON object. Any instances of the characters '/' or '~' in a path component are escaped as '~1' or '~0' respectively. This syntax deliberately resembles JSON Pointer, but no JSON Pointer behaviors other than those mentioned here are supported.
Constructors
- AttributeReference(String ref)
- Take an attribute reference string and produce an attribute reference.
-
AttributeReference.fromComponents(List<
String> components) - Create an attribute reference from a list of components.
Properties
-
components
→ List<
String> -
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- redactionName → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- valid → bool
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromLiteral(
String literal) → AttributeReference - Create an attribute reference from a literal.