瀏覽代碼

added Expr#indexofBytecode.


git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@31 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
tags/rel_3_17_1_ga
chiba 21 年之前
父節點
當前提交
4fc98e2092
共有 3 個文件被更改,包括 14 次插入3 次删除
  1. 2
    1
      Readme.html
  2. 1
    1
      src/main/javassist/bytecode/CodeIterator.java
  3. 11
    1
      src/main/javassist/expr/Expr.java

+ 2
- 1
Readme.html 查看文件



<h2>Changes</h2> <h2>Changes</h2>


<p>- version 2.6 in July, 2003.
<p>- version 2.6 in August, 2003.


<ul> <ul>
<li>CtConstructor.setBody() now works for class initializers. <li>CtConstructor.setBody() now works for class initializers.
<li>CtNewMethod.delegator() now works for static methods. <li>CtNewMethod.delegator() now works for static methods.
<li>javassist.expr.Expr.indexOfBytecode() has been added.
</ul> </ul>


<p>- version 2.5.1 in May, 2003. <p>- version 2.5.1 in May, 2003.

+ 1
- 1
src/main/javassist/bytecode/CodeIterator.java 查看文件



/** /**
* Returns the index of the next instruction * Returns the index of the next instruction
* (not the next opcode).
* (not the operand following the current opcode).
* *
* <p>Note that the index is into the byte array returned by * <p>Note that the index is into the byte array returned by
* <code>get().getCode()</code>. * <code>get().getCode()</code>.

+ 11
- 1
src/main/javassist/expr/Expr.java 查看文件



static final String javaLangObject = "java.lang.Object"; 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; currentPos = pos;
iterator = i; iterator = i;
thisClass = declaring; thisClass = declaring;
list.add(c); list.add(c);
} }


/**
* 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 * Returns the line number of the source line containing the
* expression. * expression.

Loading…
取消
儲存