diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-09 15:46:05 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-09 15:46:05 +0000 |
commit | 8d6a1e3cfe585fc1432d295cb3b884baad9fbc38 (patch) | |
tree | e1149b213fad89a8eb871746aae1388d6cc4d3e3 /sources/scalac/atree | |
parent | d68d41ec0a7fecdff51fc52cd6965b122ace536e (diff) | |
download | scala-8d6a1e3cfe585fc1432d295cb3b884baad9fbc38.tar.gz scala-8d6a1e3cfe585fc1432d295cb3b884baad9fbc38.tar.bz2 scala-8d6a1e3cfe585fc1432d295cb3b884baad9fbc38.zip |
- Added methods isNew, isDynamic, isStatic, has...
- Added methods isNew, isDynamic, isStatic, hasInstance.
Diffstat (limited to 'sources/scalac/atree')
-rw-r--r-- | sources/scalac/atree/AInvokeStyle.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sources/scalac/atree/AInvokeStyle.java b/sources/scalac/atree/AInvokeStyle.java index 43951a6a37..f833aad2f0 100644 --- a/sources/scalac/atree/AInvokeStyle.java +++ b/sources/scalac/atree/AInvokeStyle.java @@ -29,6 +29,48 @@ public class AInvokeStyle { //######################################################################## // Public Methods + /** Is this a new object creation? */ + public boolean isNew() { + switch (this) { + case New: + return true; + default: + return false; + } + } + + /** Is this a dynamic method call? */ + public boolean isDynamic() { + switch (this) { + case Dynamic: + return true; + default: + return false; + } + } + + /** Is this a static method call? */ + public boolean isStatic() { + switch (this) { + case Static(_): + return true; + default: + return false; + } + } + + /** Is this an instance method call? */ + public boolean hasInstance() { + switch (this) { + case Dynamic: + return true; + case Static(boolean onInstance): + return onInstance; + default: + return false; + } + } + /** Returns a string representation of this style. */ public String toString() { switch (this) { |