constructReference method

BoundLoopReference constructReference(
  1. List<Object> moreParts
)

Creates a new BoundLoopRefererence 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 BoundLoopRefererence referencing "loop0.foo.bar". Now suppose that the widget itself has an ArgsReference that references "args.a.baz". The "args.a" part identifies the aforementioned BoundLoopReference, and so the resulting reference is actually to "loop0.foo.bar.baz".

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

The resolved value (which is what the parts will eventually index into) is maintained in the new object.

Implementation

BoundLoopReference constructReference(List<Object> moreParts) {
  return BoundLoopReference(value, parts + moreParts);
}