PROPOSAL: Method and Field Literals

Jesse Wilson jesse at
Thu Mar 12 00:05:28 PDT 2009

On Wed, Mar 11, 2009 at 9:48 PM, Reinier Zwitserloot <
reinier at> wrote:

> What's this useful for, exactly? Can anyone name me one non-exotic
> use-case?

In Glazed Lists we have an interface called
maps a value object to its columns for a table. A concise API to
methods would be convenient:
  TableFormat songsTableFormat = new TableFormat.Builder()
      .addColumn("Name", Song#getSongName())
      .addColumn("Track #", Song#getTrackNumber())
      .addColumn("Artist", Song#getArtist())
      .addColumn("Album", Song#getAlbum())

Google Code Search suggests another 7,000 immediate candidates:

This includes code from Apache HTTP client, Log4J, Ant, JPA, SwingX, EJB,
SAX, Google Collections, GWT, Hibernate, Seam, MySQL, Equinox, Eclipse...
you name it.

More information about the coin-dev mailing list