summaryrefslogtreecommitdiff
path: root/sources/scalac/atree/AInvokeStyle.java
diff options
context:
space:
mode:
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) {