constructReference method

DataReference constructReference(
  1. List<Object> moreParts
)

Creates a new DataRefererence that indexes even deeper than this one.

For example, suppose a widget's arguments consisted of a map with one key, "a", whose value was a DataRefererence referencing "data.foo.bar". Now suppose that the widget itself has an ArgsReference that references "args.a.baz". The "args.a" part identifies the aforementioned DataReference, and so the resulting reference is actually to "data.foo.bar.baz".

In this example, the DataReference to "data.foo.bar" would have its constructReference method invoked by the runtime, with ["baz"] as the moreParts argument, so that the resulting DataReference's parts is a combination of the original's (["foo", "bar"]) and the additional parts provided to the method.

Implementation

DataReference constructReference(List<Object> moreParts) {
  return DataReference(parts + moreParts);
}