Package com.jd.glowworm.asm

Examples of com.jd.glowworm.asm.Label


       
        mw.visitLabel(_end);
    }

    private void _char(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ISTORE, context.var("char"));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
View Full Code Here


       
        mw.visitLabel(_end);
    }

    private void _boolean(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ISTORE, context.var("boolean"));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
View Full Code Here

                ASMUtils.getDesc(property.getFieldClass()));
        }
    }

    private void _byte(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ISTORE, context.var("byte"));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
View Full Code Here

        mw.visitLabel(_end);
    }

    private void _short(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ISTORE, context.var("short"));

        mw.visitVarInsn(ALOAD, context.var("out"));
View Full Code Here

       
        mw.visitLabel(_end);
    }

    private void _int(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ISTORE, context.var("int"));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
View Full Code Here

       
        mw.visitLabel(_end);
    }

    private void _decimal(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ASTORE, context.var("decimal"));
       
        Label _if = new Label();
        Label _else = new Label();
        Label _end_if = new Label();

        mw.visitLabel(_if);

        // if (decimalValue == null) {
        mw.visitVarInsn(ALOAD, context.var("decimal"));
View Full Code Here

        mw.visitLabel(_end);
    }

    private void _string(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context,
        int fieldInfoIndexParm) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(ASTORE, context.var("string"));
       
        Label _else = new Label();
        Label _end_if = new Label();

        // if (value == null) {
        mw.visitVarInsn(ALOAD, context.var("string"));
        mw.visitJumpInsn(IFNONNULL, _else);
View Full Code Here

        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);
       
        _get(mw, context, property);
        mw.visitTypeInsn(CHECKCAST, ASMUtils.getType(List.class)); // cast
        mw.visitVarInsn(ASTORE, context.var("list"));
       
        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("list"));
        mw.visitMethodInsn(INVOKEINTERFACE, ASMUtils.getType(List.class), "size", "()I");
        mw.visitVarInsn(ISTORE, context.var("int"));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
        //mw.visitVarInsn(ALOAD, context.fieldName());
        //mw.visitIntInsn(BIPUSH, fieldInfoIndexParm);
        mw.visitIntInsn(BIPUSH, fieldInfoIndexParm);
        mw.visitVarInsn(ILOAD, context.var("int"));
        mw.visitMethodInsn(INVOKEVIRTUAL, ASMUtils.getType(SerializeWriter.class), "writeGroup", "(II)V");
       
        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);
        // if list.size == 0
        mw.visitJumpInsn(GOTO, _end_if_3);

        mw.visitLabel(_else_3);
        {
            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) {
View Full Code Here

        mw.visitLabel(_end);
    }
   
    private void _writeObject(MethodVisitor mw, FieldInfo fieldInfo, Context context, Label _end,
        int fieldInfoIndexParm) {
        Label _not_null = new Label();

        /*mw.visitVarInsn(ALOAD, context.processValue());
        mw.visitJumpInsn(IFNONNULL, _not_null); // if (obj == null)
        _if_write_null(mw, fieldInfo, context);
        mw.visitJumpInsn(GOTO, _end);*/
 
View Full Code Here

TOP

Related Classes of com.jd.glowworm.asm.Label

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.