public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Shrink the array of InnerClassesInfo objects. innerClassesAttribute.u2classesCount = shrinkArray(innerClassesAttribute.classes, innerClassesAttribute.u2classesCount); }
public void visitLibraryClass(LibraryClass libraryClass) { // Library classes are left unchanged. // Compact the extra field pointing to the subclasses of this class. libraryClass.subClasses = shrinkToNewArray(libraryClass.subClasses); }
new InterfaceDeleter(shrinkFlags(programClass.constantPool, programClass.u2interfaces, programClass.u2interfacesCount)) shrinkConstantPool(programClass.constantPool, programClass.u2constantPoolCount); shrinkArray(programClass.fields, programClass.u2fieldsCount); if (programClass.u2fieldsCount < oldFieldsCount) shrinkArray(programClass.methods, programClass.u2methodsCount); if (programClass.u2methodsCount < oldMethodsCount) shrinkArray(programClass.attributes, programClass.u2attributesCount); shrinkToNewArray(programClass.subClasses);
shrinkConstantIndexArray(programClass.constantPool, programClass.u2interfaces, programClass.u2interfacesCount); shrinkConstantPool(programClass.constantPool, programClass.u2constantPoolCount); shrinkArray(programClass.fields, programClass.u2fieldsCount); shrinkArray(programClass.methods, programClass.u2methodsCount); shrinkArray(programClass.attributes, programClass.u2attributesCount); shrinkToNewArray(programClass.subClasses);
new MultiClassVisitor( new ClassVisitor[] { new ClassShrinker(usageMarker), new ClassPoolFiller(newProgramClassPool) })));
public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute) { // Shrink the array of BootstrapMethodInfo objects. int newBootstrapMethodsCount = shrinkBootstrapMethodArray(bootstrapMethodsAttribute.bootstrapMethods, bootstrapMethodsAttribute.u2bootstrapMethodsCount); if (newBootstrapMethodsCount < bootstrapMethodsAttribute.u2bootstrapMethodsCount) { bootstrapMethodsAttribute.u2bootstrapMethodsCount = newBootstrapMethodsCount; // Remap all bootstrap method references. bootstrapMethodRemapper.setBootstrapMethodIndexMap(bootstrapMethodIndexMap); clazz.constantPoolEntriesAccept(bootstrapMethodRemapper); } }
new InterfaceDeleter(shrinkFlags(programClass.constantPool, programClass.u2interfaces, programClass.u2interfacesCount)) shrinkConstantPool(programClass.constantPool, programClass.u2constantPoolCount); shrinkArray(programClass.fields, programClass.u2fieldsCount); if (programClass.u2fieldsCount < oldFieldsCount) shrinkArray(programClass.methods, programClass.u2methodsCount); if (programClass.u2methodsCount < oldMethodsCount) shrinkArray(programClass.attributes, programClass.u2attributesCount); shrinkToNewArray(programClass.subClasses);
new UsedClassFilter(usageMarker, new MultiClassVisitor( new ClassShrinker(usageMarker), new ClassPoolFiller(newProgramClassPool) ))); new ClassShrinker(usageMarker));
public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute) { // Shrink the array of BootstrapMethodInfo objects. int newBootstrapMethodsCount = shrinkBootstrapMethodArray(bootstrapMethodsAttribute.bootstrapMethods, bootstrapMethodsAttribute.u2bootstrapMethodsCount); if (newBootstrapMethodsCount < bootstrapMethodsAttribute.u2bootstrapMethodsCount) { bootstrapMethodsAttribute.u2bootstrapMethodsCount = newBootstrapMethodsCount; // Remap all bootstrap method references. bootstrapMethodRemapper.setBootstrapMethodIndexMap(bootstrapMethodIndexMap); clazz.constantPoolEntriesAccept(bootstrapMethodRemapper); } }
new InterfaceDeleter(shrinkFlags(programClass.constantPool, programClass.u2interfaces, programClass.u2interfacesCount)) shrinkConstantPool(programClass.constantPool, programClass.u2constantPoolCount); shrinkArray(programClass.fields, programClass.u2fieldsCount); if (programClass.u2fieldsCount < oldFieldsCount) shrinkArray(programClass.methods, programClass.u2methodsCount); if (programClass.u2methodsCount < oldMethodsCount) shrinkArray(programClass.attributes, programClass.u2attributesCount); shrinkToNewArray(programClass.subClasses);
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Shrink the attributes array. codeAttribute.u2attributesCount = shrinkArray(codeAttribute.attributes, codeAttribute.u2attributesCount); }
public void visitLibraryClass(LibraryClass libraryClass) { // Library classes are left unchanged. // Compact the extra field pointing to the subclasses of this class. libraryClass.subClasses = shrinkToNewArray(libraryClass.subClasses); }
new UsedClassFilter(usageMarker, new MultiClassVisitor( new ClassShrinker(usageMarker), new ClassPoolFiller(newProgramClassPool) ))); new ClassShrinker(usageMarker));
public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute) { // Shrink the array of BootstrapMethodInfo objects. int newBootstrapMethodsCount = shrinkBootstrapMethodArray(bootstrapMethodsAttribute.bootstrapMethods, bootstrapMethodsAttribute.u2bootstrapMethodsCount); if (newBootstrapMethodsCount < bootstrapMethodsAttribute.u2bootstrapMethodsCount) { bootstrapMethodsAttribute.u2bootstrapMethodsCount = newBootstrapMethodsCount; // Remap all bootstrap method references. bootstrapMethodRemapper.setBootstrapMethodIndexMap(bootstrapMethodIndexMap); clazz.constantPoolEntriesAccept(bootstrapMethodRemapper); } }
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute) { // Shrink the local variable type info array. localVariableTypeTableAttribute.u2localVariableTypeTableLength = shrinkArray(localVariableTypeTableAttribute.localVariableTypeTable, localVariableTypeTableAttribute.u2localVariableTypeTableLength); }
public void visitLibraryClass(LibraryClass libraryClass) { // Library classes are left unchanged. // Compact the extra field pointing to the subclasses of this class. libraryClass.subClasses = shrinkToNewArray(libraryClass.subClasses); }
new UsedClassFilter(usageMarker, new MultiClassVisitor( new ClassShrinker(usageMarker), new ClassPoolFiller(newProgramClassPool) ))); new ClassShrinker(usageMarker));
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute) { // Shrink the local variable type info array. localVariableTypeTableAttribute.u2localVariableTypeTableLength = shrinkArray(localVariableTypeTableAttribute.localVariableTypeTable, localVariableTypeTableAttribute.u2localVariableTypeTableLength); }
public void visitLibraryClass(LibraryClass libraryClass) { // Library classes are left unchanged. // Compact the extra field pointing to the subclasses of this class. libraryClass.subClasses = shrinkToNewArray(libraryClass.subClasses); }
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute) { // Shrink the local variable info array. localVariableTableAttribute.u2localVariableTableLength = shrinkArray(localVariableTableAttribute.localVariableTable, localVariableTableAttribute.u2localVariableTableLength); }