MethodSymbol
exposes isCaseAccessor
, isGetter
, isSetter
, accessed
for the field and setter
for the setter.
I could use the practice if code is needed, but probably not.
Am I looking at different ScalaDoc than you? Sometimes it's hard to know where to look.
Edit: actually it's on TermSymbolApi
.
Update:
scala> class C(var i: Int, var s: String)
defined class C
scala> typeOf[C].declarations.filter(s => s.isMethod && s.asMethod.isGetter && s.asMethod.setter != NoSymbol)
res10: Iterable[reflect.runtime.universe.Symbol] = SynchronizedOps(method i, method s)
scala> .map { s => val m = s.asMethod ; (m, m.setter) }
res11: Iterable[(reflect.runtime.universe.MethodSymbol, reflect.runtime.universe.Symbol)] = List((method i,method i_=), (method s,method s_=))