From ebf00a8a27e3e86df7c7a95f5d8dd9c4f57fb755 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 15 Jun 2012 20:55:29 +0200 Subject: exposes extra tests for symbols as discussed on reflection meeting review by @odersky --- src/reflect/scala/reflect/api/Symbols.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala index 1d266dc778..b2eb598cc0 100644 --- a/src/reflect/scala/reflect/api/Symbols.scala +++ b/src/reflect/scala/reflect/api/Symbols.scala @@ -116,11 +116,28 @@ trait Symbols extends base.Symbols { self: Universe => */ def isValue: Boolean + /** Does this symbol denote a stable value? */ + def isStable: Boolean + /** Does this symbol represent a mutable value? * If yes, `isTerm` and `isValue` are also guaranteed to be true. */ def isVariable: Boolean + /** Does this symbol represent a getter or a setter? + */ + def isAccessor: Boolean + + /** Does this symbol represent a getter of a field? + * If yes, `isTerm` and `isMethod` are also guaranteed to be true. + */ + def isGetter: Boolean + + /** Does this symbol represent a setter of a field? + * If yes, `isTerm` and `isMethod` are also guaranteed to be true. + */ + def isSetter: Boolean + /** Does this symbol represent the definition of a package? * If yes, `isTerm` is also guaranteed to be true. */ -- cgit v1.2.3