Play Framework のソース コードの一部を以下に示します。
package play.api.mvc
trait Results extends java.lang.Object {
def $init$() : scala.Unit = { /* compiled code */ }
def Async(promise : scala.concurrent.Future[play.api.mvc.Result]) : play.api.mvc.AsyncResult = { /* compiled code */ }
val Ok : Results.this.Status = { /* compiled code */ }
val Created : Results.this.Status = { /* compiled code */ }
val Accepted : Results.this.Status = { /* compiled code */ }
//.......................
なぜ彼らは名前val
をdef
大文字で始めるのだろうか?
さらに、一部のクラスとオブジェクトは小文字で始まります。
package views.html.play20
object book extends BaseScalaTemplate[play.api.templates.Html, play.templates.Format[play.api.templates.Html]] with play.api.templates.Template1[scala.Seq[scala.Predef.String], play.api.templates.Html] {
def apply(pages : scala.Seq[scala.Predef.String]) : play.api.templates.Html = { /* compiled code */ }
//.............
}
package views.html.play20
object manual extends play.templates.BaseScalaTemplate[play.api.templates.Html, play.templates.Format[play.api.templates.Html]] with play.api.templates.Template3[scala.Predef.String, scala.Option[scala.Predef.String], scala.Option[scala.Predef.String], play.api.templates.Html] {
def apply(title : scala.Predef.String, main : scala.Option[scala.Predef.String], sidebar : scala.Option[scala.Predef.String]) : play.api.templates.Html = { /* compiled code */ }
//............
}
package views
package object xml extends java.lang.Object {
}