throws NotFoundException transformers = new TransformAccessArrayField(transformers, calledClass.getName(), names);
initFrames(clazz, minfo); pos = replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); } else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) { pos = replace(cp, iterator, pos, c, getStoreReplacementSignature(c));
private int replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) throws BadBytecode { String castType = null; String methodName = getMethodName(opcode); if (methodName != null) { castType = getTopType(iterator.lookAhead()); pos = updatePos(pos, gap.length);
public int transform(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) throws BadBytecode { int c = iterator.byteAt(pos); if (c == AALOAD || c == BALOAD || c == CALOAD || c == DALOAD || c == FALOAD || c == IALOAD || c == LALOAD || c == SALOAD) replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) replace(cp, iterator, pos, c, getStoreReplacementSignature(c)); return pos; }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
private void replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) throws BadBytecode { String methodName = getMethodName(opcode); if (methodName != null) { iterator.insertGap(2); int mi = cp.addClassInfo(methodClassname); int methodref = cp.addMethodrefInfo(mi, methodName, signature); iterator.writeByte(INVOKESTATIC, pos); iterator.write16bit(methodref, pos + 1); } }
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
initFrames(clazz, minfo); pos = replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); } else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) { pos = replace(cp, iterator, pos, c, getStoreReplacementSignature(c));
private int replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) throws BadBytecode { String castType = null; String methodName = getMethodName(opcode); if (methodName != null) { castType = getTopType(iterator.lookAhead()); pos = updatePos(pos, gap.length);
throws NotFoundException transformers = new TransformAccessArrayField(transformers, calledClass.getName(), names);
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
initFrames(clazz, minfo); pos = replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); } else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) { pos = replace(cp, iterator, pos, c, getStoreReplacementSignature(c));
private int replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) throws BadBytecode { String castType = null; String methodName = getMethodName(opcode); if (methodName != null) { castType = getTopType(iterator.lookAhead()); pos = updatePos(pos, gap.length);
throws NotFoundException transformers = new TransformAccessArrayField(transformers, calledClass.getName(), names);
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
initFrames(clazz, minfo); pos = replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); } else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) { pos = replace(cp, iterator, pos, c, getStoreReplacementSignature(c));
private int replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) throws BadBytecode { String castType = null; String methodName = getMethodName(opcode); if (methodName != null) { castType = getTopType(iterator.lookAhead()); pos = updatePos(pos, gap.length);
throws NotFoundException transformers = new TransformAccessArrayField(transformers, calledClass.getName(), names);
private String getTopType(int pos) throws BadBytecode { Frame frame = getFrame(pos); if (frame == null) return null; CtClass clazz = frame.peek().getCtClass(); return clazz != null ? Descriptor.toJvmName(clazz) : null; }
initFrames(clazz, minfo); pos = replace(cp, iterator, pos, c, getLoadReplacementSignature(c)); } else if (c == AASTORE || c == BASTORE || c == CASTORE || c == DASTORE || c == FASTORE || c == IASTORE || c == LASTORE || c == SASTORE) { pos = replace(cp, iterator, pos, c, getStoreReplacementSignature(c));