Examples of ASMException


Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitLdcInsn(com.alibaba.fastjson.asm.Type.getType(getDesc(fieldClass))); // cast
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([CLjava/lang/Class;)" + getDesc(Collection.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitLdcInsn(com.alibaba.fastjson.asm.Type.getType(getDesc(fieldClass))); // cast
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONLexer.class), "scanFieldStringArray",
                                           "([CLjava/lang/Class;)" + getDesc(Collection.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass, i);

                        if (i == fieldListSize - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass, i);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitLdcInsn(com.alibaba.fastjson.asm.Type.getType(getDesc(fieldClass))); // cast
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONLexer.class), "scanFieldStringArray",
                                           "([CLjava/lang/Class;)" + getDesc(Collection.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass, i);

                        if (i == fieldListSize - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass, i);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([C)" + getDesc(ArrayList.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

            Type actualTypeArgument = ((ParameterizedType) fieldType).getActualTypeArguments()[0];

            if (actualTypeArgument instanceof Class) {
                itemClass = (Class<?>) actualTypeArgument;
                if (!Modifier.isPublic(itemClass.getModifiers())) {
                    throw new ASMException("can not create ASMParser");
                }
            } else {
                throw new ASMException("can not create ASMParser");
            }
            return itemClass;
        }

        return Object.class;
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitLdcInsn(com.alibaba.fastjson.asm.Type.getType(getDesc(fieldClass))); // cast
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([CLjava/lang/Class;)" + getDesc(Collection.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                       
                        _setFlag(mw, context, i);
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass, i);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass, i);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

            Type actualTypeArgument = ((ParameterizedType) fieldType).getActualTypeArguments()[0];

            if (actualTypeArgument instanceof Class) {
                itemClass = (Class<?>) actualTypeArgument;
                if (!Modifier.isPublic(itemClass.getModifiers())) {
                    throw new ASMException("can not create ASMParser");
                }
            } else {
                throw new ASMException("can not create ASMParser");
            }
            return itemClass;
        }

        return Object.class;
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([C)" + getDesc(ArrayList.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([C)" + getDesc(ArrayList.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass);
View Full Code Here

Examples of com.alibaba.fastjson.asm.ASMException

                if (actualTypeArgument instanceof Class) {
                    Class<?> itemClass = (Class<?>) actualTypeArgument;

                    if (!Modifier.isPublic(itemClass.getModifiers())) {
                        throw new ASMException("can not create ASMParser");
                    }

                    if (itemClass == String.class) {
                        mw.visitLdcInsn(com.alibaba.fastjson.asm.Type.getType(getDesc(fieldClass))); // cast
                        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
                                           "([CLjava/lang/Class;)" + getDesc(Collection.class));
                        mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
                    } else {
                        _deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);

                        if (i == size - 1) {
                            _deserialize_endCheck(context, mw, reset_);
                        }
                        continue;
                    }
                } else {
                    throw new ASMException("can not create ASMParser");
                }

            } else {
                _deserialze_obj(context, mw, reset_, fieldInfo, fieldClass);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.