From 2052b68d97f11aba9c5b825f5226e12ec4e05149 Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 6 Oct 2003 06:27:14 +0000 Subject: - Replaced test of name length by call to isRoot - Added methods is isTypeAlias & isAbstractType --- sources/scalac/symtab/Symbol.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sources/scalac/symtab/Symbol.java') diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index c8ab34bd07..311df5084d 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -402,6 +402,16 @@ public abstract class Symbol implements Modifiers, Kinds { return (flags & INTERFACE) != 0; } + /** Does this symbol denote a type alias? */ + public final boolean isTypeAlias() { + return kind == ALIAS; + } + + /** Does this symbol denote an abstract type? */ + public final boolean isAbstractType() { + return kind == TYPE; + } + /** Does this symbol denote a public symbol? */ public final boolean isPublic() { return !isProtected() && !isPrivate(); @@ -1751,7 +1761,7 @@ public class ClassSymbol extends TypeSymbol { /** Get the fully qualified name of this Symbol */ public Name fullName() { - if (owner().kind == CLASS && owner().name.length() != 0) + if (owner().kind == CLASS && !owner().isRoot()) return Name.fromString(owner().fullName() + "." + name); else return name.toTermName(); -- cgit v1.2.3