Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-291

Byteman should support expression lists for array iniitalization

    XMLWordPrintable

Details

    Description

      Currently it is only possible to initialise or assign an array variable to an empty array using a new expression e.g.

        BIND values : Object[] = new Object[4];
        . . .
      

      It would be convenient to be able to be able to initialise an array using an expression list comprising a series of comma-separated Java expressions written between braces e.g.

        BIND values : Object[] = { $0, $1.getName() }
        . . .
      

      It might also be useful to allow new array expressions to employ the same syntax e.g.

        BIND values : Object[] = null;
        . . .
        DO values = new Object[] {$0, $1.getName() };
        . . .
      

      since this defers the creation of the array to after the IF test.

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: