code: static void switchDollarSignPropsToBrackets(Node def, final AbstractCompiler compiler) {
      checkState(def.isObjectLit() || def.isClassMembers());
      for (Node keyNode : def.children()) {
        Node value = keyNode.getFirstChild();
        if (value != null && value.isFunction()) {
          NodeUtil.visitPostOrder(
              value.getLastChild(),
              new NodeUtil.Visitor() {
                @Override
                public void visit(Node n) {
                  if (n.isString()
                      && n.getString().equals("$")
                      && n.getParent().isGetProp()
                      && n.getGrandparent().isGetProp()) {
                    Node dollarChildProp = n.getGrandparent();
                    dollarChildProp.setToken(Token.GETELEM);
                    compiler.reportChangeToEnclosingScope(dollarChildProp);
                  }
                }
              });
        }
      }
    }
docs: Switches all "this.$.foo" to "this.$['foo']".