Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.ClassGen.removeMethod()


        ClassGen cg = getClassGen();
        Method method = cg.containsMethod(name, sig);
        if (method == null) {
            return false;
        } else {
            cg.removeMethod(method);
            m_isModified = true;
            m_isHashCurrent = false;
            return true;
        }
    }
View Full Code Here


                InstructionHandle ih_25 = il.append( InstructionFactory.createReturn( Type.VOID ) );
                ifnull_13.setTarget( ih_25 );
                mg.setMaxStack();
                mg.setMaxLocals();

                cg.removeMethod( method );
                cg.addMethod( mg.getMethod() );

                il.dispose();
            }
            else if ( method.getName().equals( "setPathResolver" ) && types.length == 1
View Full Code Here

                il.append( InstructionFactory.createReturn( Type.VOID ) );

                mg.setMaxStack();
                mg.setMaxLocals();

                cg.removeMethod( method );
                cg.addMethod( mg.getMethod() );

                il.dispose();
            }
        }
View Full Code Here

        Method[] methods = cg.getMethods();
        for ( Method method : methods )
        {
            if ( method.getName().equals( "main" ) )
            {
                cg.removeMethod( method );

                MethodGen mg = new MethodGen( method, jc.getClassName(), p );
                InstructionList il = mg.getInstructionList();
                for ( Iterator<?> it = il.iterator(); it.hasNext(); )
                {
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.