diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-05 13:01:34 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-05 13:01:34 +0000 |
commit | d2d7a7ed163deb502de97b13373786ed742434a4 (patch) | |
tree | dbf349e502d638192008bcdd48b7a99770f8c528 /sources/scalac/symtab | |
parent | f40e29b44cd2d2f46313eb5122eca3ed3ee5c22e (diff) | |
download | scala-d2d7a7ed163deb502de97b13373786ed742434a4.tar.gz scala-d2d7a7ed163deb502de97b13373786ed742434a4.tar.bz2 scala-d2d7a7ed163deb502de97b13373786ed742434a4.zip |
- Added method isStatic
Diffstat (limited to 'sources/scalac/symtab')
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 470a566a56..c3724ff85d 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -296,6 +296,11 @@ public abstract class Symbol implements Modifiers, Kinds { return (flags & STABLE) != 0; } + /** Is this symbol static (i.e. with no outer instance)? */ + public final boolean isStatic() { + return owner.isPackage() || (owner.isJava() && owner.isModuleClass()); + } + /** Is this symbol final? */ public final boolean isFinal() { |