IntrabandProxyUtil { protected static void serializerWrite( MethodNodeGenerator methodNodeGenerator, Type type) { String owner = _SERIALIZER_TYPE.getInternalName(); if (type.getSort() <= Type.DOUBLE) { String name = TextFormatter.format( type.getClassName(), TextFormatter.G); methodNodeGenerator.invokeVirtual( owner, "write".concat(name), Type.VOID_TYPE, type); } else if (type.equals(_STRING_TYPE)) { methodNodeGenerator.invokeVirtual( owner, "writeString", Type.VOID_TYPE, _STRING_TYPE); } else { methodNodeGenerator.invokeVirtual( owner, "writeObject", Type.VOID_TYPE, _SERIALIZABLE_TYPE); } }  static String[] getProxyMethodSignatures(Class<?> clazz); static Class<?> getStubClass(Class<?> clazz, String skeletonId); static Class<?> getStubClass(
		ClassLoader classLoader, Class<?> clazz, String skeletonId); static T newStubInstance(
		Class<? extends T> stubClass, String id,
		RegistrationReference registrationReference,
		ExceptionHandler exceptionHandler); static final String SKELETON_POSTFIX; static final String STUB_POSTFIX; }
@Test public void testSerializerWrite() { MethodNode methodNode = new MethodNode( Opcodes.ACC_PUBLIC, "name", "()V", null, null); MethodNodeGenerator methodNodeGenerator = new MethodNodeGenerator( methodNode); InsnList insnList = methodNode.instructions; for (Type type : _types) { IntrabandProxyUtil.serializerWrite(methodNodeGenerator, type); AbstractInsnNode abstractInsnNode = insnList.getLast(); Assert.assertTrue(abstractInsnNode instanceof MethodInsnNode); MethodInsnNode methodInsnNode = (MethodInsnNode)abstractInsnNode; Assert.assertEquals( Opcodes.INVOKEVIRTUAL, abstractInsnNode.getOpcode()); Assert.assertEquals( Type.getInternalName(Serializer.class), methodInsnNode.owner); if (type.getSort() <= Type.DOUBLE) { String name = TextFormatter.format( type.getClassName(), TextFormatter.G); Assert.assertEquals("write".concat(name), methodInsnNode.name); Assert.assertEquals( Type.getMethodDescriptor(Type.VOID_TYPE, type), methodInsnNode.desc); } else if (type.equals(Type.getType(String.class))) { Assert.assertEquals("writeString", methodInsnNode.name); Assert.assertEquals( Type.getMethodDescriptor( Type.VOID_TYPE, Type.getType(String.class)), methodInsnNode.desc); } else { Assert.assertEquals("writeObject", methodInsnNode.name); Assert.assertEquals( Type.getMethodDescriptor( Type.VOID_TYPE, Type.getType(Serializable.class)), methodInsnNode.desc); } } }