|
Scala example source code file (protected-constructors.scala)
The Scala protected-constructors.scala source code
package dingus {
class Foo1() { protected def this(name: String) = this() }
class Foo2 protected (name: String) { }
object Ding {
protected class Foo3(name: String) { }
}
}
package hungus {
import dingus._
object P {
class Bar1 extends Foo1("abc")
class Bar2 extends Foo2("abc")
class Bar3 extends Ding.Foo3("abc")
val foo1 = new Foo1("abc")
val foo2 = new Foo2("abc")
val foo3 = new Ding.Foo3("abc")
}
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala protected-constructors.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.