aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/src
diff options
context:
space:
mode:
authorAndy Clement <aclement@vmware.com>2012-03-19 12:16:10 -0700
committerAndy Clement <aclement@vmware.com>2012-03-19 12:16:10 -0700
commit1c0f36ea2026aff22afd9c9d22782db8233c8b95 (patch)
tree7582cd560a816f7e0ce3b61ce355013ded9f1f79 /bcel-builder/src
parent3632df8d96f210577c2d86c0b184737a59db23aa (diff)
downloadaspectj-1c0f36ea2026aff22afd9c9d22782db8233c8b95.tar.gz
aspectj-1c0f36ea2026aff22afd9c9d22782db8233c8b95.zip
call jps and indy
Diffstat (limited to 'bcel-builder/src')
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/generic/InvokeDynamic.java17
2 files changed, 17 insertions, 2 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java
index 4987969c3..44b263ffb 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/FieldOrMethod.java
@@ -68,7 +68,7 @@ import org.aspectj.apache.bcel.classfile.ConstantUtf8;
public abstract class FieldOrMethod extends InstructionCP {
protected String signature;
- private String name;
+ protected String name;
private String classname;
protected FieldOrMethod(short opcode, int index) {
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InvokeDynamic.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InvokeDynamic.java
index 7083500d0..951f9b1b3 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InvokeDynamic.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InvokeDynamic.java
@@ -58,6 +58,7 @@ import java.io.DataOutputStream;
import java.io.IOException;
import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.ConstantCP;
import org.aspectj.apache.bcel.classfile.ConstantInvokeDynamic;
import org.aspectj.apache.bcel.classfile.ConstantNameAndType;
import org.aspectj.apache.bcel.classfile.ConstantPool;
@@ -108,9 +109,23 @@ public final class InvokeDynamic extends InvokeInstruction {
if (signature == null) {
ConstantInvokeDynamic cid = (ConstantInvokeDynamic)cp.getConstant(index);
ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cid.getNameAndTypeIndex());
- signature = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getValue();
+ signature = cp.getConstantUtf8(cnat.getSignatureIndex()).getValue();
}
return signature;
}
+
+ @Override
+ public String getName(ConstantPool cp) {
+ if (name == null) {
+ ConstantInvokeDynamic cid = (ConstantInvokeDynamic) cp.getConstant(index);
+ ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cid.getNameAndTypeIndex());
+ name = cp.getConstantUtf8(cnat.getNameIndex()).getValue();
+ }
+ return name;
+ }
+
+ public String getClassName(ConstantPool cp) {
+ throw new IllegalStateException("nyi");
+ }
}