在 scala 2.13.6+ 库中,自动生成带有 `$extension` 后缀的函数的目的是什么?

In scala 2.13.6+ library, what are the purposes of automatically generated functions with `$extension` suffix?

看scala的反编译字节码的时候发现classscala.StringOps:

下面有很多函数
  @scala.inline
  final def view$extension($this : scala.collection.StringOps) : scala.collection.StringView = { /* compiled code */ }
  @scala.inline
  final def size$extension($this : scala.collection.StringOps) : scala.Int = { /* compiled code */ }
  @scala.inline
  final def knownSize$extension($this : scala.collection.StringOps) : scala.Int = { /* compiled code */ }
  @scala.inline
  final def apply$extension($this : scala.collection.StringOps)(i : scala.Int) : scala.Char = { /* compiled code */ }
  final def sizeCompare$extension($this : scala.collection.StringOps)(otherSize : scala.Int) : scala.Int = { /* compiled code */ }
  final def lengthCompare$extension($this : scala.collection.StringOps)(len : scala.Int) : scala.Int = { /* compiled code */ }
  final def sizeIs$extension($this : scala.collection.StringOps) : scala.Int = { /* compiled code */ }
  final def lengthIs$extension($this : scala.collection.StringOps) : scala.Int = { /* compiled code */ }
  final def map$extension[B]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def map$extension($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, scala.Char]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def flatMap$extension[B]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, scala.collection.IterableOnce[B]]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def flatMap$extension($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, _root_.scala.Predef.String]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def collect$extension($this : scala.collection.StringOps)(pf : scala.PartialFunction[scala.Char, scala.Char]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def collect$extension[B]($this : scala.collection.StringOps)(pf : scala.PartialFunction[scala.Char, B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def concat$extension[B >: scala.Char]($this : scala.collection.StringOps)(suffix : scala.collection.IterableOnce[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def concat$extension($this : scala.collection.StringOps)(suffix : scala.collection.IterableOnce[scala.Char]) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def concat$extension($this : scala.collection.StringOps)(suffix : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def `++$extension`[B >: scala.Char]($this : scala.collection.StringOps)(suffix : scala.collection.Iterable[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def `++$extension`($this : scala.collection.StringOps)(suffix : scala.collection.IterableOnce[scala.Char]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def `++$extension`($this : scala.collection.StringOps)(xs : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  final def padTo$extension[B >: scala.Char]($this : scala.collection.StringOps)(len : scala.Int, elem : B) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def padTo$extension($this : scala.collection.StringOps)(len : scala.Int, elem : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  final def prepended$extension[B >: scala.Char]($this : scala.collection.StringOps)(elem : B) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def `+:$extension`[B >: scala.Char]($this : scala.collection.StringOps)(elem : B) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def prepended$extension($this : scala.collection.StringOps)(c : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def `+:$extension`($this : scala.collection.StringOps)(c : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  final def prependedAll$extension[B >: scala.Char]($this : scala.collection.StringOps)(prefix : scala.collection.IterableOnce[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def `++:$extension`[B >: scala.Char]($this : scala.collection.StringOps)(prefix : scala.collection.IterableOnce[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def prependedAll$extension($this : scala.collection.StringOps)(prefix : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def `++:$extension`($this : scala.collection.StringOps)(prefix : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  final def appended$extension[B >: scala.Char]($this : scala.collection.StringOps)(elem : B) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def `:+$extension`[B >: scala.Char]($this : scala.collection.StringOps)(elem : B) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def appended$extension($this : scala.collection.StringOps)(c : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def `:+$extension`($this : scala.collection.StringOps)(c : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def appendedAll$extension[B >: scala.Char]($this : scala.collection.StringOps)(suffix : scala.collection.IterableOnce[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def `:++$extension`[B >: scala.Char]($this : scala.collection.StringOps)(suffix : scala.collection.IterableOnce[B]) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  @scala.inline
  final def appendedAll$extension($this : scala.collection.StringOps)(suffix : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def `:++$extension`($this : scala.collection.StringOps)(suffix : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  final def patch$extension[B >: scala.Char]($this : scala.collection.StringOps)(from : scala.Int, other : scala.collection.IterableOnce[B], replaced : scala.Int) : scala.collection.immutable.IndexedSeq[B] = { /* compiled code */ }
  final def patch$extension($this : scala.collection.StringOps)(from : scala.Int, other : scala.collection.IterableOnce[scala.Char], replaced : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def patch$extension($this : scala.collection.StringOps)(from : scala.Int, other : _root_.scala.Predef.String, replaced : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def updated$extension($this : scala.collection.StringOps)(index : scala.Int, elem : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  final def contains$extension($this : scala.collection.StringOps)(elem : scala.Char) : scala.Boolean = { /* compiled code */ }
  final def mkString$extension($this : scala.collection.StringOps)(start : _root_.scala.Predef.String, sep : _root_.scala.Predef.String, end : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def mkString$extension($this : scala.collection.StringOps)(sep : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def mkString$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def addString$extension($this : scala.collection.StringOps)(b : scala.collection.mutable.StringBuilder) : scala.collection.mutable.StringBuilder = { /* compiled code */ }
  @scala.inline
  final def addString$extension($this : scala.collection.StringOps)(b : scala.collection.mutable.StringBuilder, sep : _root_.scala.Predef.String) : scala.collection.mutable.StringBuilder = { /* compiled code */ }
  final def addString$extension($this : scala.collection.StringOps)(b : scala.collection.mutable.StringBuilder, start : _root_.scala.Predef.String, sep : _root_.scala.Predef.String, end : _root_.scala.Predef.String) : scala.collection.mutable.StringBuilder = { /* compiled code */ }
  final def slice$extension($this : scala.collection.StringOps)(from : scala.Int, until : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def `*$extension`($this : scala.collection.StringOps)(n : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def isLineBreak$extension($this : scala.collection.StringOps)(c : scala.Char) : scala.Boolean = { /* compiled code */ }
  @scala.inline
  final def isLineBreak2$extension($this : scala.collection.StringOps)(c0 : scala.Char, c : scala.Char) : scala.Boolean = { /* compiled code */ }
  final def stripLineEnd$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def linesWithSeparators$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def linesIterator$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def linesSeparated$extension($this : scala.collection.StringOps)(stripped : scala.Boolean) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  @scala.deprecated(message = "Use `linesIterator`, because JDK 11 adds a `lines` method on String", since = "2.13.0")
  final def lines$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def capitalize$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def stripPrefix$extension($this : scala.collection.StringOps)(prefix : _root_.scala.Predef.String) : java.lang.String = { /* compiled code */ }
  final def stripSuffix$extension($this : scala.collection.StringOps)(suffix : _root_.scala.Predef.String) : java.lang.String = { /* compiled code */ }
  @scala.deprecated(message = "Use `s.replace` as an exact replacement", since = "2.13.2")
  final def replaceAllLiterally$extension($this : scala.collection.StringOps)(literal : _root_.scala.Predef.String, replacement : _root_.scala.Predef.String) : _root_.scala.Predef.String = { /* compiled code */ }
  final def stripMargin$extension($this : scala.collection.StringOps)(marginChar : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  final def stripMargin$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def escape$extension($this : scala.collection.StringOps)(ch : scala.Char) : _root_.scala.Predef.String = { /* compiled code */ }
  final def split$extension($this : scala.collection.StringOps)(separator : scala.Char) : scala.Array[_root_.scala.Predef.String] = { /* compiled code */ }
  @scala.throws[java.util.regex.PatternSyntaxException](classOf[java.util.regex.PatternSyntaxException])
  final def split$extension($this : scala.collection.StringOps)(separators : scala.Array[scala.Char]) : scala.Array[_root_.scala.Predef.String] = { /* compiled code */ }
  final def r$extension($this : scala.collection.StringOps) : scala.util.matching.Regex = { /* compiled code */ }
  final def r$extension($this : scala.collection.StringOps)(groupNames : _root_.scala.Predef.String*) : scala.util.matching.Regex = { /* compiled code */ }
  final def toBoolean$extension($this : scala.collection.StringOps) : scala.Boolean = { /* compiled code */ }
  final def toBooleanOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Boolean] = { /* compiled code */ }
  final def toByte$extension($this : scala.collection.StringOps) : scala.Byte = { /* compiled code */ }
  final def toByteOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Byte] = { /* compiled code */ }
  final def toShort$extension($this : scala.collection.StringOps) : scala.Short = { /* compiled code */ }
  final def toShortOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Short] = { /* compiled code */ }
  final def toInt$extension($this : scala.collection.StringOps) : scala.Int = { /* compiled code */ }
  final def toIntOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Int] = { /* compiled code */ }
  final def toLong$extension($this : scala.collection.StringOps) : scala.Long = { /* compiled code */ }
  final def toLongOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Long] = { /* compiled code */ }
  final def toFloat$extension($this : scala.collection.StringOps) : scala.Float = { /* compiled code */ }
  final def toFloatOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Float] = { /* compiled code */ }
  final def toDouble$extension($this : scala.collection.StringOps) : scala.Double = { /* compiled code */ }
  final def toDoubleOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Double] = { /* compiled code */ }
  final def toBooleanImpl$extension($this : scala.collection.StringOps)(s : _root_.scala.Predef.String) : scala.Boolean = { /* compiled code */ }
  final def toArray$extension[B >: scala.Char]($this : scala.collection.StringOps)(implicit tag : scala.reflect.ClassTag[B]) : scala.Array[B] = { /* compiled code */ }
  final def unwrapArg$extension($this : scala.collection.StringOps)(arg : scala.Any) : scala.AnyRef = { /* compiled code */ }
  final def format$extension($this : scala.collection.StringOps)(args : scala.Any*) : _root_.scala.Predef.String = { /* compiled code */ }
  final def formatLocal$extension($this : scala.collection.StringOps)(l : java.util.Locale, args : scala.Any*) : _root_.scala.Predef.String = { /* compiled code */ }
  final def compare$extension($this : scala.collection.StringOps)(that : _root_.scala.Predef.String) : scala.Int = { /* compiled code */ }
  final def `<$extension`($this : scala.collection.StringOps)(that : _root_.scala.Predef.String) : scala.Boolean = { /* compiled code */ }
  final def `>$extension`($this : scala.collection.StringOps)(that : _root_.scala.Predef.String) : scala.Boolean = { /* compiled code */ }
  final def `<=$extension`($this : scala.collection.StringOps)(that : _root_.scala.Predef.String) : scala.Boolean = { /* compiled code */ }
  final def `>=$extension`($this : scala.collection.StringOps)(that : _root_.scala.Predef.String) : scala.Boolean = { /* compiled code */ }
  final def count$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Int = { /* compiled code */ }
  final def foreach$extension[U]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, U]) : scala.Unit = { /* compiled code */ }
  final def forall$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Boolean = { /* compiled code */ }
  final def foldLeft$extension[B]($this : scala.collection.StringOps)(z : B)(op : scala.Function2[B, scala.Char, B]) : B = { /* compiled code */ }
  final def foldRight$extension[B]($this : scala.collection.StringOps)(z : B)(op : scala.Function2[scala.Char, B, B]) : B = { /* compiled code */ }
  @scala.inline
  final def fold$extension[A1 >: scala.Char]($this : scala.collection.StringOps)(z : A1)(op : scala.Function2[A1, A1, A1]) : A1 = { /* compiled code */ }
  final def head$extension($this : scala.collection.StringOps) : scala.Char = { /* compiled code */ }
  final def headOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Char] = { /* compiled code */ }
  final def last$extension($this : scala.collection.StringOps) : scala.Char = { /* compiled code */ }
  final def lastOption$extension($this : scala.collection.StringOps) : scala.Option[scala.Char] = { /* compiled code */ }
  final def indices$extension($this : scala.collection.StringOps) : scala.Range = { /* compiled code */ }
  final def iterator$extension($this : scala.collection.StringOps) : scala.collection.Iterator[scala.Char] = { /* compiled code */ }
  @scala.inline
  final def stepper$extension($this : scala.collection.StringOps) : scala.collection.IntStepper with scala.collection.Stepper.EfficientSplit = { /* compiled code */ }
  @scala.inline
  final def charStepper$extension($this : scala.collection.StringOps) : scala.collection.IntStepper with scala.collection.Stepper.EfficientSplit = { /* compiled code */ }
  @scala.inline
  final def codePointStepper$extension($this : scala.collection.StringOps) : scala.collection.IntStepper with scala.collection.Stepper.EfficientSplit = { /* compiled code */ }
  @scala.inline
  final def nonEmpty$extension($this : scala.collection.StringOps) : scala.Boolean = { /* compiled code */ }
  final def reverse$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def reverseIterator$extension($this : scala.collection.StringOps) : scala.collection.Iterator[scala.Char] = { /* compiled code */ }
  final def withFilter$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.collection.StringOps.WithFilter = { /* compiled code */ }
  final def tail$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def init$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def take$extension($this : scala.collection.StringOps)(n : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def drop$extension($this : scala.collection.StringOps)(n : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def takeRight$extension($this : scala.collection.StringOps)(n : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def dropRight$extension($this : scala.collection.StringOps)(n : scala.Int) : _root_.scala.Predef.String = { /* compiled code */ }
  final def tails$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def inits$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def iterateUntilEmpty$extension($this : scala.collection.StringOps)(f : scala.Function1[_root_.scala.Predef.String, _root_.scala.Predef.String]) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def filter$extension($this : scala.collection.StringOps)(pred : scala.Function1[scala.Char, scala.Boolean]) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def filterNot$extension($this : scala.collection.StringOps)(pred : scala.Function1[scala.Char, scala.Boolean]) : _root_.scala.Predef.String = { /* compiled code */ }
  @scala.inline
  final def copyToArray$extension($this : scala.collection.StringOps)(xs : scala.Array[scala.Char]) : scala.Int = { /* compiled code */ }
  @scala.inline
  final def copyToArray$extension($this : scala.collection.StringOps)(xs : scala.Array[scala.Char], start : scala.Int) : scala.Int = { /* compiled code */ }
  final def copyToArray$extension($this : scala.collection.StringOps)(xs : scala.Array[scala.Char], start : scala.Int, len : scala.Int) : scala.Int = { /* compiled code */ }
  final def indexWhere$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean], from : scala.Int = { /* compiled code */ }) : scala.Int = { /* compiled code */ }
  final def lastIndexWhere$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean], end : scala.Int = { /* compiled code */ }) : scala.Int = { /* compiled code */ }
  final def exists$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Boolean = { /* compiled code */ }
  final def find$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Option[scala.Char] = { /* compiled code */ }
  final def dropWhile$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def takeWhile$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def splitAt$extension($this : scala.collection.StringOps)(n : scala.Int) : scala.Tuple2[_root_.scala.Predef.String, _root_.scala.Predef.String] = { /* compiled code */ }
  final def span$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Tuple2[_root_.scala.Predef.String, _root_.scala.Predef.String] = { /* compiled code */ }
  final def grouped$extension($this : scala.collection.StringOps)(size : scala.Int) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def partition$extension($this : scala.collection.StringOps)(p : scala.Function1[scala.Char, scala.Boolean]) : scala.Tuple2[_root_.scala.Predef.String, _root_.scala.Predef.String] = { /* compiled code */ }
  final def partitionMap$extension($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, scala.Either[scala.Char, scala.Char]]) : scala.Tuple2[_root_.scala.Predef.String, _root_.scala.Predef.String] = { /* compiled code */ }
  final def lazyZip$extension[B]($this : scala.collection.StringOps)(that : scala.collection.Iterable[B]) : scala.collection.LazyZip2[scala.Char, B, _root_.scala.Predef.String] = { /* compiled code */ }
  final def diff$extension[B >: scala.Char]($this : scala.collection.StringOps)(that : scala.collection.Seq[B]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def intersect$extension[B >: scala.Char]($this : scala.collection.StringOps)(that : scala.collection.Seq[B]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def distinct$extension($this : scala.collection.StringOps) : _root_.scala.Predef.String = { /* compiled code */ }
  final def distinctBy$extension[B]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, B]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def sorted$extension[B >: scala.Char]($this : scala.collection.StringOps)(implicit ord : scala.Ordering[B]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def sortWith$extension($this : scala.collection.StringOps)(lt : scala.Function2[scala.Char, scala.Char, scala.Boolean]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def sortBy$extension[B]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, B])(implicit ord : scala.Ordering[B]) : _root_.scala.Predef.String = { /* compiled code */ }
  final def groupBy$extension[K]($this : scala.collection.StringOps)(f : scala.Function1[scala.Char, K]) : scala.collection.immutable.Map[K, _root_.scala.Predef.String] = { /* compiled code */ }
  final def sliding$extension($this : scala.collection.StringOps)(size : scala.Int, step : scala.Int = { /* compiled code */ }) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def combinations$extension($this : scala.collection.StringOps)(n : scala.Int) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }
  final def permutations$extension($this : scala.collection.StringOps) : scala.collection.Iterator[_root_.scala.Predef.String] = { /* compiled code */ }

它们显然是自动生成的(因为它们在源代码或 javadoc 中没有对应项)。但是我找不到任何官方解释。所以我的问题是:

生成这些方法是因为 StringOps 是一个值 class。您可以阅读 value classes SIP 了解它们是如何翻译的。

基本上 new StringOps("foo").view 被翻译成 StringOps.view$extension("foo") 以避免任何装箱。