class MoneyTransfer(Source: Account, Destination: Account, amount: Int) extends Context {
Source.withdraw
role(Source) { def withdraw { Source.decreaseBalance(amount) Destination.deposit } }
role(Destination) { def deposit { Destination.increaseBalance(amount) } }}class MoneyTransfer(Source: Account, Destination: Account, amount: Int) extends Context {
Source.withdraw
role(Source) { def withdraw { self.decreaseBalance(amount) Destination.deposit } }
role(Destination) { def deposit { self.increaseBalance(amount) } }}class MoneyTransfer(Source: Account, Destination: Account, amount: Int) extends Context {
Source.withdraw
role(Source) { def withdraw { this.decreaseBalance(amount) Destination.deposit } }
role(Destination) { def deposit { this.increaseBalance(amount) } }}class MoneyTransfer(Source: Account, Destination: Account, amount: Int) extends Context {
Source_withdraw()
private def Source_withdraw() { Source.decreaseBalance(amount) Destination_deposit() }
private def Destination_deposit() { Destination.increaseBalance(amount) }}