Sign in using Google or Yahoo! id.  

Scala Beans

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 

The easiest way to define a bean in Scala:

import reflect.BeanProperty;

class Parent {
  @BeanProperty
  var firstName: String = null

  @BeanProperty
  var lastName: String = null

  @BeanProperty
  var phone: String = null
}

getters and setters will be automatically be generated (required by many frameworks).

Posted on February 27, 2010 09:11 AM by Subhash Chandran
scala
blog comments powered by Disqus