blob: c9579c681a129cd2df45d11ff9b44774a6a0ca11 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package myapp.cake
object services {
import database.Database
import logger.Logger
trait HasApplication {
type ApplicationType
def application: ApplicationType with ApplicationService
trait ApplicationService {
def run: Unit
}
}
trait HasDatabase {
type DatabaseType
def database: DatabaseType with DatabaseService
trait DatabaseService extends Database
}
trait HasLogger {
type LoggerType
def logger: LoggerType with LoggerService
trait LoggerService extends Logger
}
}
|