Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package test
- @TestAnnotation(Constants.test + ", world!")
- object HelloWorld {
- def main(args: Array[String]) {
- println("Hello, world!")
- }
- }
- package test
- object Constants {
- final val test = "Hello"
- }
- package test;
- @interface TestAnnotation {
- String value();
- }
- $ sbt run
- [info] Compiling 2 Scala sources and 1 Java source to .../so22717836annotation/target/scala-2.10/classes...
- [info] Running HelloWorld
- Hello, world!
- $ for i in `echo build.sbt; find src/main -type f`; do
- echo '###' $i '###'; echo; perl -pe 's/^/ /' $i; echo; done
- name := "so22717836"
- version := "0.0.1"
- scalaVersion := "2.10.4"
- package test;
- public @interface TestAnnotation {
- String value();
- }
- import test._
- @TestAnnotation(Constants.test + ", world!")
- object HelloWorld {
- def main(args: Array[String]) {
- println("Hello, world!")
- }
- }
- object Constants {
- final val test = "Hello"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement