private void addSetter(Method method, MethodCodeBody body) throws Exception { String methodDescriptor = Type.getMethodDescriptor(method); MethodVisitor methodVisitor = visitor.visitMethod( Opcodes.ACC_PUBLIC, method.getName(), methodDescriptor, null, new String[0]); methodVisitor.visitCode(); body.add(methodVisitor); methodVisitor.visitInsn(Opcodes.RETURN); methodVisitor.visitMaxs(0, 0); methodVisitor.visitEnd(); }
private void addGetter(Method method, MethodCodeBody body) throws Exception { String methodDescriptor = Type.getMethodDescriptor(method); String methodName = method.getName(); addGetter(methodName, methodDescriptor, body); }