aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/expr
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-05-16 17:31:38 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-05-16 17:31:38 +0000
commit4a1ef53c0d35d29afa8f46607f22d908b12cea91 (patch)
tree2c41c37bf92115ce8a209a2fb6d09a78df600d0f /src/main/javassist/expr
parent5fc3a4c6aa6cd5378d417f98b66f76529c4341e4 (diff)
downloadjavassist-4a1ef53c0d35d29afa8f46607f22d908b12cea91.tar.gz
javassist-4a1ef53c0d35d29afa8f46607f22d908b12cea91.zip
added isSuper() in MethodCall.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@17 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/expr')
-rw-r--r--src/main/javassist/expr/MethodCall.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/javassist/expr/MethodCall.java b/src/main/javassist/expr/MethodCall.java
index 265677f5..06ea6418 100644
--- a/src/main/javassist/expr/MethodCall.java
+++ b/src/main/javassist/expr/MethodCall.java
@@ -127,6 +127,15 @@ public class MethodCall extends Expr {
return super.mayThrow();
}
+ /**
+ * Returns true if the called method is of a superclass of the current
+ * class.
+ */
+ boolean isSuper() {
+ return iterator.byteAt(currentPos) == INVOKESPECIAL
+ && !where().getDeclaringClass().getName().equals(getClassName());
+ }
+
/*
* Returns the parameter types of the called method.