Package org.mvel2.asm

Examples of org.mvel2.asm.MethodVisitor.visitLabel()


                                 null,
                                 null );

            mv.visitCode();
            final Label l0 = new Label();
            mv.visitLabel( l0 );

            mv.visitVarInsn( Opcodes.ALOAD,
                             1 );
            mv.visitTypeInsn( Opcodes.CHECKCAST,
                              Type.getInternalName( originalClass ) );
View Full Code Here


            }

            mv.visitInsn( Opcodes.RETURN );

            final Label l1 = new Label();
            mv.visitLabel( l1 );
            mv.visitLocalVariable( "this",
                                   "L" + className + ";",
                                   null,
                                   l0,
                                   l1,
View Full Code Here

                mv.visitVarInsn( ALOAD, 0 );
                mv.visitFieldInsn( GETFIELD, BuildUtils.getInternalType( wrapperName ), TraitableBean.TRAITSET_FIELD_NAME, Type.getDescriptor( Map.class ) );
                mv.visitFieldInsn( GETSTATIC, Type.getInternalName( Collections.class ), "EMPTY_MAP", Type.getDescriptor( Map.class ) );
                Label l1 = new Label();
                mv.visitJumpInsn( IF_ACMPNE, l1 );
                mv.visitLabel( l0 );

                mv.visitVarInsn( ALOAD, 0 );
                mv.visitTypeInsn( NEW, Type.getInternalName( TraitTypeMap.class ) );
                mv.visitInsn( DUP );
                mv.visitTypeInsn( NEW, Type.getInternalName( HashMap.class ) );
View Full Code Here

                mv.visitTypeInsn( NEW, Type.getInternalName( HashMap.class ) );
                mv.visitInsn( DUP );
                mv.visitMethodInsn( INVOKESPECIAL, Type.getInternalName( HashMap.class ), "<init>", "()V" );
                mv.visitMethodInsn( INVOKESPECIAL, Type.getInternalName( TraitTypeMap.class ), "<init>", "(" + Type.getDescriptor( Map.class ) + ")V" );
                mv.visitFieldInsn( PUTFIELD, BuildUtils.getInternalType( wrapperName ), TraitableBean.TRAITSET_FIELD_NAME, Type.getDescriptor( Map.class ) );
                mv.visitLabel( l1 );
                mv.visitVarInsn( ALOAD, 0 );
                mv.visitFieldInsn( GETFIELD, BuildUtils.getInternalType( wrapperName ), TraitableBean.TRAITSET_FIELD_NAME, Type.getDescriptor( Map.class ) );
                mv.visitInsn( ARETURN );
                mv.visitMaxs( 0, 0 );
                mv.visitEnd();
View Full Code Here

                mv.visitMethodInsn( INVOKEINTERFACE, Type.getInternalName( Map.class ), "isEmpty", Type.getMethodDescriptor( Type.BOOLEAN_TYPE, new Type[] {} ) );
                mv.visitJumpInsn( IFNE, l5 );
                mv.visitInsn( ICONST_1 );
                Label l4 = new Label();
                mv.visitJumpInsn( GOTO, l4 );
                mv.visitLabel( l5 );
                mv.visitInsn( ICONST_0 );
                mv.visitLabel( l4 );
                mv.visitInsn( IRETURN );
                mv.visitMaxs( 0, 0 );
                mv.visitEnd();
View Full Code Here

                mv.visitInsn( ICONST_1 );
                Label l4 = new Label();
                mv.visitJumpInsn( GOTO, l4 );
                mv.visitLabel( l5 );
                mv.visitInsn( ICONST_0 );
                mv.visitLabel( l4 );
                mv.visitInsn( IRETURN );
                mv.visitMaxs( 0, 0 );
                mv.visitEnd();
            }
        }
View Full Code Here

                if ( j != N ) {
                    Label l1 = new Label();
                    mv.visitJumpInsn( IFNONNULL, l1 );
                    mv.visitInsn( ICONST_1 );
                    mv.visitInsn( IRETURN );
                    mv.visitLabel( l1 );
                } else {
                    mv.visitJumpInsn( IFNONNULL, l99 );
                    mv.visitInsn( ICONST_1 );
                    mv.visitInsn( IRETURN );
                    mv.visitLabel( l99 );
View Full Code Here

                    mv.visitLabel( l1 );
                } else {
                    mv.visitJumpInsn( IFNONNULL, l99 );
                    mv.visitInsn( ICONST_1 );
                    mv.visitInsn( IRETURN );
                    mv.visitLabel( l99 );
                }

            }
        }
View Full Code Here

                                    "put",
                                    "(" + Type.getDescriptor( String.class ) + Type.getDescriptor( Object.class ) + ")" + Type.getDescriptor( Object.class ) );
                mv.visitInsn( POP );
                mv.visitVarInsn( ALOAD, 2 );
                mv.visitInsn( ARETURN );
                mv.visitLabel( l2 );
            }
        }

        mv.visitVarInsn( ALOAD, 0 );
        mv.visitVarInsn( ALOAD, 1 );
View Full Code Here

                        mv.visitMethodInsn( INVOKEVIRTUAL, proxyType, BuildUtils.getterName( field.getName(), field.getTypeName() ),
                                            "()" + BuildUtils.getTypeDescriptor( field.getTypeName() ) );
                        mv.visitMethodInsn( INVOKEVIRTUAL, BuildUtils.getInternalType( field.getTypeName() ), "hashCode", "()I" );
                        Label l9 = new Label();
                        mv.visitJumpInsn( GOTO, l9 );
                        mv.visitLabel( l8 );
                        mv.visitInsn( ICONST_0 );
                        mv.visitLabel( l9 );
                        mv.visitInsn( IADD );
                        mv.visitVarInsn( ISTORE, 1 );
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.