- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: maven and Java 1.6
Thu, 2009-03-05, 18:43
dustin.whitney@gmail.com wrote:
> I want to use java.beans.ConstructorProperties which is only available
> in java 6
The -target option for scalac controls byte-code target, not source
version target. The following code compiles and runs just fine for me
with Scala 2.7.3:
package org.chen_becker.test
import java.beans.ConstructorProperties
import scala.reflect.BeanProperty
object JVM1_6Test {
def main(args : Array[String]) : Unit = {
print(new TestCP("Fred", 99))
}
}
@ConstructorProperties{val value = Array("name", "age")}
class TestCP(@BeanProperty val name : String, @BeanProperty val age : Int) {
override def toString = name + ":" + age
}
Also, you can use reply-all or the following procmail recipe to make
sure that replies go to the list instead of individual authors (unless
that's what you want):
# Auto-mogrify scala lists
:0 fhw
* ^List-Post:.*scala-user@listes.epfl.ch
|formail -f -a "Reply-To: scala-user@listes.epfl.ch"
Derek