summaryrefslogtreecommitdiff
path: root/sources/scalac/atree/AInvokeStyle.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-02-09 15:46:05 +0000
committerpaltherr <paltherr@epfl.ch>2004-02-09 15:46:05 +0000
commit8d6a1e3cfe585fc1432d295cb3b884baad9fbc38 (patch)
treee1149b213fad89a8eb871746aae1388d6cc4d3e3 /sources/scalac/atree/AInvokeStyle.java
parentd68d41ec0a7fecdff51fc52cd6965b122ace536e (diff)
downloadscala-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/AInvokeStyle.java')
-rw-r--r--sources/scalac/atree/AInvokeStyle.java42
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) {