Joh*_*ter 4 scala
在下面的例子中,"=>"是什么意思?
trait MyService[E <: Entity[ID]] extends Management { this: Repository[E] => // some code }
Gre*_*man 8
在这个例子中,它意味着this必须属于该类型Repository[E].这意味着特征MyService只能混合到扩展的类中Repository[E].
this
Repository[E]
MyService
归档时间:
10 年,7 月 前
查看次数:
118 次
最近记录: