diff options
author | schinz <schinz@epfl.ch> | 2003-05-14 13:04:13 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-05-14 13:04:13 +0000 |
commit | 7f08642a0a44a90da287e176f3a820e328ce6d3d (patch) | |
tree | 556a686e86befc6adbbbd1a39ece0ca9e370d35d /sources/scalac/symtab/Symbol.java | |
parent | b9ff893fdfcca3f97c5c953ba46461cf623c4b14 (diff) | |
download | scala-7f08642a0a44a90da287e176f3a820e328ce6d3d.tar.gz scala-7f08642a0a44a90da287e176f3a820e328ce6d3d.tar.bz2 scala-7f08642a0a44a90da287e176f3a820e328ce6d3d.zip |
- added valueParams method
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 181edac352..3bb3f76e87 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -243,7 +243,7 @@ public abstract class Symbol implements Modifiers, Kinds { return kind == CLASS && (flags & MODUL) != 0; } - /** Does this symbol denote a module? */ + /** Does this symbol denote a class? */ public final boolean isClass() { return kind == CLASS; } @@ -395,6 +395,11 @@ public abstract class Symbol implements Modifiers, Kinds { return EMPTY_ARRAY; } + /** Get value parameters */ + public Symbol[] valueParams() { + return EMPTY_ARRAY; + } + /** Get primary constructor of class */ public Symbol constructor() { return NONE; @@ -957,6 +962,10 @@ public class TermSymbol extends Symbol { return type().typeParams(); } + public Symbol[] valueParams() { + return type().valueParams(); + } + public Symbol primaryConstructorClass() { return isConstructor() && clazz != null ? clazz : this; } @@ -1000,6 +1009,11 @@ public class TypeSymbol extends Symbol { return tycon; } + public Symbol setOwner(Symbol owner) { + tycon = null; + return super.setOwner(owner); + } + /** Get type */ public Type type() { return typeConstructor(); @@ -1258,6 +1272,10 @@ public class ClassSymbol extends TypeSymbol { return constructor.info().typeParams(); } + public Symbol[] valueParams() { + return constructor.info().valueParams(); + } + /** Get type */ public Type type() { if (template == null || template.typeArgs().length != typeParams().length) { @@ -1267,6 +1285,11 @@ public class ClassSymbol extends TypeSymbol { return template; } + public Symbol setOwner(Symbol owner) { + template = null; + return super.setOwner(owner); + } + public Type thisType() { return thistp; } |