Package com.jd.glowworm.asm

Examples of com.jd.glowworm.asm.Label


                                                                    + getDesc(Type.class)
                                                                    + "Ljava/lang/Object;)Ljava/lang/Object;", null,
                                          null);
       
        //Label super_ = new Label();
        Label return_ = new Label();
        Label end_ = new Label();
       
        Constructor<?> defaultConstructor = context.getBeanInfo().getDefaultConstructor();

        // create instance
        if (context.getClazz().isInterface()) {
View Full Code Here


        mw.visitMethodInsn(INVOKEVIRTUAL, getType(PBDeserializer.class), "setContext",
                           "(Lcom/jd/glowworm/deserializer/ParseContext;)V");

        // TODO childContext is null
        if (setObject) {
            Label endIf_ = new Label();
            mw.visitVarInsn(ALOAD, context.var("childContext"));
            mw.visitJumpInsn(IFNULL, endIf_);

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

        }
    }

    private void _deserialze_list_obj(Context context, MethodVisitor mw, FieldInfo fieldInfo,
                                      Class<?> fieldClass, Class<?> itemType) {       
        Label notNull_ = new Label();
        mw.visitVarInsn(ALOAD, 0);
        mw.visitFieldInsn(GETFIELD, context.getClassName(), fieldInfo.getName() + "_asm_list_item_deser__",
                          getDesc(ObjectDeserializer.class));
        mw.visitJumpInsn(IFNONNULL, notNull_);
       
View Full Code Here

        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
    }

    private void _deserialze_obj(Context context, MethodVisitor mw, FieldInfo fieldInfo,
                                 Class<?> fieldClass) {
        Label notNull_ = new Label();
        mw.visitVarInsn(ALOAD, 0);
        mw.visitFieldInsn(GETFIELD, context.getClassName(), fieldInfo.getName() + "_asm_deser__",
                          getDesc(ObjectDeserializer.class));
        mw.visitJumpInsn(IFNONNULL, notNull_);
       
View Full Code Here

        return (ObjectSerializer) instance;
    }

    private void generateWriteMethod(Class<?> clazz, MethodVisitor mw, List<FieldInfo> getters, Context context)
                                                                                                                throws Exception {
        Label end = new Label();
        int size = getters.size();
       
        for (int i = 0; i < size; ++i) {
            FieldInfo property = getters.get(i);
            Class<?> propertyClass = property.getFieldClass();
View Full Code Here

        }
    }
   
    private void _object(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context,
        int fieldInfoIndexParm) {
        Label _end = new Label();

        _get(mw, context, property);
        mw.visitVarInsn(ASTORE, context.var("object"));

        _writeObject(mw, property, context, _end, fieldInfoIndexParm);
View Full Code Here

        mw.visitLabel(_end);
    }

    private void _enum(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _not_null = new Label();
        Label _end_if = new Label();
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitTypeInsn(CHECKCAST, ASMUtils.getType(Enum.class)); // cast
        mw.visitVarInsn(ASTORE, context.var("enum"));
       
View Full Code Here

        mw.visitLabel(_end_if);
        mw.visitLabel(_end);
    }

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

        mw.visitLabel(_end);
    }

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

       
        mw.visitLabel(_end);
    }

    private void _double(Class<?> clazz, MethodVisitor mw, FieldInfo property, Context context) {
        Label _end = new Label();
       
        _get(mw, context, property);
        mw.visitVarInsn(DSTORE, context.var("double", 2));
       
        mw.visitVarInsn(ALOAD, context.var("out"));
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.