Package proguard.classfile.editor

Examples of proguard.classfile.editor.ConstantPoolEditor


                            System.out.println("  ["+programClass.getName()+"."+name+descriptor+"] ("+ClassUtil.externalClassAccessFlags(programMethod.getAccessFlags())+") -> ["+newDescriptor+"]");
                        }

                        // Update the descriptor.
                        programMethod.u2descriptorIndex =
                            new ConstantPoolEditor(programClass).addUtf8Constant(newDescriptor);

                        // Fix the local variable frame size, the method
                        // signature, and the parameter annotations, if
                        // necessary.
                        programMethod.attributesAccept(programClass,
View Full Code Here


                              descriptor.charAt(descriptorIndex - 1) +
                              signature.substring(signatureIndex);

        // Update the signature.
        signatureAttribute.u2signatureIndex =
            new ConstantPoolEditor((ProgramClass)clazz).addUtf8Constant(newSignature);
    }
View Full Code Here

                System.out.println("  ["+programClass.getName()+"."+
                                   name+descriptor+"] -> ["+
                                   newName+newDescriptor+"]");
            }

            ConstantPoolEditor constantPoolEditor =
                new ConstantPoolEditor(programClass);

            // Update the name, if necessary.
            if (!newName.equals(name))
            {
                programMethod.u2nameIndex =
                    constantPoolEditor.addUtf8Constant(newName);
            }

            // Update the referenced classes.
            programMethod.referencedClasses =
                shrinkReferencedClasses(programMethod,
                                        descriptor,
                                        programMethod.referencedClasses);

            // Finally, update the descriptor itself.
            programMethod.u2descriptorIndex =
                constantPoolEditor.addUtf8Constant(newDescriptor);

            // Visit the method, if required.
            if (extraMemberVisitor != null)
            {
                extraMemberVisitor.visitProgramMethod(programClass, programMethod);
View Full Code Here

        String signature    = clazz.getString(signatureAttribute.u2signatureIndex);
        String newSignature = shrinkDescriptor(method, signature);

        // Update the signature.
        signatureAttribute.u2signatureIndex =
            new ConstantPoolEditor((ProgramClass)clazz).addUtf8Constant(newSignature);

        // Update the referenced classes.
        signatureAttribute.referencedClasses =
            shrinkReferencedClasses(method,
                                    signature,
View Full Code Here

TOP

Related Classes of proguard.classfile.editor.ConstantPoolEditor

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.