summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-06 06:27:14 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-06 06:27:14 +0000
commit2052b68d97f11aba9c5b825f5226e12ec4e05149 (patch)
treef9469e2ade1fcf614097b31c37297409666b25f8 /sources
parent8870ac88ff96c1cee59fddde38076ed4e86b0f6e (diff)
downloadscala-2052b68d97f11aba9c5b825f5226e12ec4e05149.tar.gz
scala-2052b68d97f11aba9c5b825f5226e12ec4e05149.tar.bz2
scala-2052b68d97f11aba9c5b825f5226e12ec4e05149.zip
- Replaced test of name length by call to isRoot
- Added methods is isTypeAlias & isAbstractType
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/symtab/Symbol.java12
1 files changed, 11 insertions, 1 deletions
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();