apm.write(context);
}
};
IBytecodeResolvable st = getSuperType();
while (st != null && !"java.lang.Object".equals( st.getType().getClassName() )) {
for (IBytecodeMethod method : st.getDeclaredMethods()) {
if (method.getAccess().isStatic() || method.getAccess().getScope() != Scope.Public) continue;
this.addMethod(method.getName() + "$$", Scope.Private, false, true, method.getDescriptor()).setMethodBody(
new BytecodeBlock() {
@Override protected void writeInstructions(BytecodeContextMethod context) {
context.returnValue(
context.createSuperInvocation(context.getMethod().getName().split("\\$")[0], context.getMethodArguments())
);
}
}
);
BytecodeMethodConcrete bmc = this.addMethod(method.getName(), Scope.Public, false, true, method.getDescriptor());
bmc.copyAnnotations(method);
bmc.setMethodBody(apmb);
}
st = st.getSuperType();
}
try {
Method toString = type.getMethod("toString");
if (toString.getDeclaringClass() == Object.class) {