summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland <rk@rkuhn.info>2012-09-18 15:32:51 +0200
committerRoland <rk@rkuhn.info>2012-09-18 15:32:51 +0200
commit7e766a0e6a4cd758ff7a4300bf1064bc2745e35b (patch)
treeec47a3c23ea316931223e44b6ef8d21c88d2900a
parent61480eb14a07c78a6746d2a6dc1e302d5baa112f (diff)
downloadscala-7e766a0e6a4cd758ff7a4300bf1064bc2745e35b.tar.gz
scala-7e766a0e6a4cd758ff7a4300bf1064bc2745e35b.tar.bz2
scala-7e766a0e6a4cd758ff7a4300bf1064bc2745e35b.zip
clarify caveats of App trait
-rw-r--r--src/library/scala/App.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library/scala/App.scala b/src/library/scala/App.scala
index 85d2f9075e..a1e5e74e2f 100644
--- a/src/library/scala/App.scala
+++ b/src/library/scala/App.scala
@@ -22,6 +22,16 @@ import scala.collection.mutable.ListBuffer
*
* `args` returns the current command line arguments as an array.
*
+ * ==Caveats==
+ *
+ * '''''It should be noted that this trait is implemented using the [[DelayedInit]]
+ * functionality, which means that fields of the object will not have been initialized
+ * before the main method has been executed.'''''
+ *
+ * It should also be noted that the `main` method will not normally need to be overridden:
+ * the purpose is to turn the whole class body into the “main method”. You should only
+ * chose to override it if you know what you are doing.
+ *
* @author Martin Odersky
* @version 2.1, 15/02/2011
*/