我在哪里可以找到 scala.Any 和 scala.AnyRef 的定义? [英] Where can I find the definition of scala.Any and scala.AnyRef?

查看:128
本文介绍了我在哪里可以找到 scala.Any 和 scala.AnyRef 的定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想跳入 Any 的源代码,看看某些方法是如何实现的,但我发现它没有包含在 scala-library-src 中,AnyRef 也没有(但是,值类型和 Nothing 都没有).我很好奇,Scala 对象基类型是如何以及在哪里实现的?

I wanted to jump into the source of Any to see how some methods had been implemented, but I see it is not included in the scala-library-src, and neither is AnyRef (value types and Nothing are, however). I'm curious, how and where are Scala object base types implemented?

推荐答案

/src/library-aux/scala/Any.scala/src/library-aux/scala/AnyRef.scala 包含 trait Anytrait AnyRef.

/src/library-aux/scala/Any.scala and /src/library-aux/scala/AnyRef.scala contain trait Any and trait AnyRef.

这篇关于我在哪里可以找到 scala.Any 和 scala.AnyRef 的定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆