Class<?> elementClass = null;
if (elementType instanceof Class<?>) {
elementClass = (Class<?>) elementType;
}
Label _end = new Label();
Label _if = new Label();
Label _else = new Label();
Label _end_if = new Label();
mw.visitLabel(_if);
_nameApply(mw, property, context, _end);
_get(mw, context, property);
mw.visitTypeInsn(CHECKCAST, getType(List.class)); // cast
mw.visitVarInsn(ASTORE, context.var("list"));
_filters(mw, property, context, _end);
mw.visitVarInsn(ALOAD, context.var("list"));
mw.visitJumpInsn(IFNONNULL, _else);
_if_write_null(mw, property, context);
mw.visitJumpInsn(GOTO, _end_if);
mw.visitLabel(_else); // else {
mw.visitVarInsn(ALOAD, context.var("out"));
mw.visitVarInsn(ILOAD, context.var("seperator"));
mw.visitMethodInsn(INVOKEVIRTUAL, getType(SerializeWriter.class), "write", "(C)V");
mw.visitVarInsn(ALOAD, context.var("out"));
mw.visitVarInsn(ALOAD, context.fieldName());
mw.visitMethodInsn(INVOKEVIRTUAL, getType(SerializeWriter.class), "writeFieldName", "(Ljava/lang/String;)V");
//
mw.visitVarInsn(ALOAD, context.var("list"));
mw.visitMethodInsn(INVOKEINTERFACE, getType(List.class), "size", "()I");
mw.visitVarInsn(ISTORE, context.var("int"));
Label _if_3 = new Label();
Label _else_3 = new Label();
Label _end_if_3 = new Label();
mw.visitLabel(_if_3);
mw.visitVarInsn(ILOAD, context.var("int"));
mw.visitInsn(ICONST_0);
mw.visitJumpInsn(IF_ICMPNE, _else_3);
mw.visitVarInsn(ALOAD, context.var("out"));
mw.visitLdcInsn("[]");
mw.visitMethodInsn(INVOKEVIRTUAL, getType(SerializeWriter.class), "write", "(Ljava/lang/String;)V");
mw.visitJumpInsn(GOTO, _end_if_3);
mw.visitLabel(_else_3);
{
mw.visitVarInsn(ALOAD, context.serializer());
mw.visitVarInsn(ALOAD, context.var("list"));
mw.visitVarInsn(ALOAD, context.fieldName());
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONSerializer.class), "setContext",
"(Ljava/lang/Object;Ljava/lang/Object;)V");
}
{
mw.visitVarInsn(ALOAD, context.var("out"));
mw.visitVarInsn(BIPUSH, '[');
mw.visitMethodInsn(INVOKEVIRTUAL, getType(SerializeWriter.class), "write", "(C)V");
// list_serializer = null
mw.visitInsn(ACONST_NULL);
mw.visitTypeInsn(CHECKCAST, getType(ObjectSerializer.class)); // cast to string
mw.visitVarInsn(ASTORE, context.var("list_ser"));
Label _for = new Label();
Label _end_for = new Label();
mw.visitInsn(ICONST_0);
mw.visitVarInsn(ISTORE, context.var("i"));
// for (; i < list.size() -1; ++i) {