diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2003-07-31 14:37:52 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2003-07-31 14:37:52 +0000 |
commit | 4fc98e20925d92a81cb8e2076886c841993af1c5 (patch) | |
tree | de08eeda873535e6bfa291e9d1e7d3508ad75ab9 /src/main/javassist/expr | |
parent | 08d551923ef6180da486b80d0c6c47699eb3ad74 (diff) | |
download | javassist-4fc98e20925d92a81cb8e2076886c841993af1c5.tar.gz javassist-4fc98e20925d92a81cb8e2076886c841993af1c5.zip |
added Expr#indexofBytecode.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@31 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/expr')
-rw-r--r-- | src/main/javassist/expr/Expr.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/javassist/expr/Expr.java b/src/main/javassist/expr/Expr.java index b02d40e9..2764767d 100644 --- a/src/main/javassist/expr/Expr.java +++ b/src/main/javassist/expr/Expr.java @@ -35,7 +35,7 @@ public abstract class Expr implements Opcode { static final String javaLangObject = "java.lang.Object"; - Expr(int pos, CodeIterator i, CtClass declaring, MethodInfo m) { + protected Expr(int pos, CodeIterator i, CtClass declaring, MethodInfo m) { currentPos = pos; iterator = i; thisClass = declaring; @@ -125,6 +125,16 @@ public abstract class Expr implements Opcode { } /** + * Returns the index of the bytecode corresponding to the + * expression. + * It is the index into the byte array containing the Java bytecode + * that implements the method. + */ + public int indexOfBytecode() { + return currentPos; + } + + /** * Returns the line number of the source line containing the * expression. * |