下面的例子中,“=>”代表什么意思?
trait MyService[E <: Entity[ID]] extends Management {
this: Repository[E] =>
// some code
}
trait MyService[E <: Entity[ID]] extends Management {
this: Repository[E] =>
// some code
}
this
必须是类型为Repository[E]
的。这意味着traitMyService
只能混入扩展Repository[E]
的类中。