blob: 6d4a8605ee1faad439ae0b6c3a8ec342f8ae66f9 (
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
|
package myapp.cake.services
import myapp.database.Database
import myapp.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
}
|