proxy.scala

来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 34 行

SCALA
34
字号
/*                     __                                               *\**     ________ ___   / /  ___     Scala API                            ****    / __/ __// _ | / /  / _ |    (c) 2002-2008, LAMP/EPFL             ****  __\ \/ /__/ __ |/ /__/ __ |    http://www.scala-lang.org/           **** /____/\___/_/ |_/____/_/ | |                                         ****                          |/                                          **\*                                                                      */// $Id: Proxy.scala 13854 2008-01-31 14:30:29Z michelou $package scalaimport Predef._/** This class implements a simple proxy that forwards all calls to *  methods of class <code>Any</code> to another object <code>self</code>. *  Please note that only those methods can be forwarded that are *  overridable and public. * *  @author  Matthias Zenger *  @version 1.0, 26/04/2004 */trait Proxy {  def self: Any  override def hashCode: Int = self.hashCode  override def equals(that: Any): Boolean = that match {    case that: Proxy => self equals that.self    case that        => false  }  override def toString: String = self.toString}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?