proguard.classfile.attribute.InnerClassesInfo Java Examples
The following examples show how to use
proguard.classfile.attribute.InnerClassesInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClassObfuscator.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // Make sure the outer class has a name, if it exists. int innerClassIndex = innerClassesInfo.u2innerClassIndex; int outerClassIndex = innerClassesInfo.u2outerClassIndex; if (innerClassIndex != 0 && outerClassIndex != 0) { String innerClassName = clazz.getClassName(innerClassIndex); if (innerClassName.equals(clazz.getName())) { clazz.constantPoolEntryAccept(outerClassIndex, this); String outerClassName = clazz.getClassName(outerClassIndex); numericClassName = isNumericClassName(innerClassName, outerClassName); } } }
Example #2
Source File: ConstantPoolRemapper.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { if (innerClassesInfo.u2innerClassIndex != 0) { innerClassesInfo.u2innerClassIndex = remapConstantIndex(innerClassesInfo.u2innerClassIndex); } if (innerClassesInfo.u2outerClassIndex != 0) { innerClassesInfo.u2outerClassIndex = remapConstantIndex(innerClassesInfo.u2outerClassIndex); } if (innerClassesInfo.u2innerNameIndex != 0) { innerClassesInfo.u2innerNameIndex = remapConstantIndex(innerClassesInfo.u2innerNameIndex); } }
Example #3
Source File: ClassReferenceFixer.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // Fix the inner class name. int innerClassIndex = innerClassesInfo.u2innerClassIndex; int innerNameIndex = innerClassesInfo.u2innerNameIndex; if (innerClassIndex != 0 && innerNameIndex != 0) { String newInnerName = clazz.getClassName(innerClassIndex); int index = newInnerName.lastIndexOf(ClassConstants.INTERNAL_INNER_CLASS_SEPARATOR); if (index >= 0) { innerClassesInfo.u2innerNameIndex = new ConstantPoolEditor((ProgramClass)clazz).addUtf8Constant(newInnerName.substring(index + 1)); } } }
Example #4
Source File: ProgramClassReader.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Read the inner classes. innerClassesAttribute.u2classesCount = dataInput.readUnsignedShort(); innerClassesAttribute.classes = new InnerClassesInfo[innerClassesAttribute.u2classesCount]; for (int index = 0; index < innerClassesAttribute.u2classesCount; index++) { InnerClassesInfo innerClassesInfo = new InnerClassesInfo(); this.visitInnerClassesInfo(clazz, innerClassesInfo); innerClassesAttribute.classes[index] = innerClassesInfo; } }
Example #5
Source File: InnerClassesAccessFixer.java From bazel with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // The current access flags are the default. innerClassAccessFlags = innerClassesInfo.u2innerClassAccessFlags; // See if we can find new access flags. innerClassesInfo.innerClassConstantAccept(clazz, this); // Update the access flags. innerClassesInfo.u2innerClassAccessFlags = innerClassAccessFlags; }
Example #6
Source File: InnerClassesAccessFixer.java From proguard with GNU General Public License v2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // The current access flags are the default. innerClassAccessFlags = innerClassesInfo.u2innerClassAccessFlags; // See if we can find new access flags. innerClassesInfo.innerClassConstantAccept(clazz, this); // Update the access flags. innerClassesInfo.u2innerClassAccessFlags = innerClassAccessFlags; }
Example #7
Source File: NameMarker.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // Make sure the outer class name is kept as well. int innerClassIndex = innerClassesInfo.u2innerClassIndex; int outerClassIndex = innerClassesInfo.u2outerClassIndex; if (innerClassIndex != 0 && outerClassIndex != 0 && clazz.getClassName(innerClassIndex).equals(clazz.getName())) { clazz.constantPoolEntryAccept(outerClassIndex, this); } }
Example #8
Source File: Utf8UsageMarker.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { if (innerClassesInfo.u2innerNameIndex != 0) { markCpUtf8Entry(clazz, innerClassesInfo.u2innerNameIndex); } }
Example #9
Source File: ProgramClassReader.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { innerClassesInfo.u2innerClassIndex = dataInput.readUnsignedShort(); innerClassesInfo.u2outerClassIndex = dataInput.readUnsignedShort(); innerClassesInfo.u2innerNameIndex = dataInput.readUnsignedShort(); innerClassesInfo.u2innerClassAccessFlags = dataInput.readUnsignedShort(); }
Example #10
Source File: LocalOrAnonymousClassChecker.java From proguard with GNU General Public License v2.0 | 5 votes |
@Override public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { if (innerClassesInfo.u2innerClassIndex == ((ProgramClass)clazz).u2thisClass) { localOrAnonymous = innerClassesInfo.u2outerClassIndex == 0 || innerClassesInfo.u2innerNameIndex == 0; } }
Example #11
Source File: ProgramClassWriter.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { dataOutput.writeShort(innerClassesInfo.u2innerClassIndex); dataOutput.writeShort(innerClassesInfo.u2outerClassIndex); dataOutput.writeShort(innerClassesInfo.u2innerNameIndex); dataOutput.writeShort(innerClassesInfo.u2innerClassAccessFlags); }
Example #12
Source File: InnerClassesAccessFixer.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // The current access flags are the default. innerClassAccessFlags = innerClassesInfo.u2innerClassAccessFlags; // See if we can find new access flags. innerClassesInfo.innerClassConstantAccept(clazz, this); // Update the access flags. innerClassesInfo.u2innerClassAccessFlags = innerClassAccessFlags; }
Example #13
Source File: ClassPrinter.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { println(visitorInfo(innerClassesInfo) + " InnerClassesInfo:"); indent(); println("Access flags: 0x" + Integer.toHexString(innerClassesInfo.u2innerClassAccessFlags) + " = " + ClassUtil.externalClassAccessFlags(innerClassesInfo.u2innerClassAccessFlags)); innerClassesInfo.innerClassConstantAccept(clazz, this); innerClassesInfo.outerClassConstantAccept(clazz, this); innerClassesInfo.innerNameConstantAccept(clazz, this); outdent(); }
Example #14
Source File: InnerUsageMarker.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { boolean innerClassesInfoUsed = usageMarker.isUsed(innerClassesInfo); if (!innerClassesInfoUsed) { // Check if the inner class (if any) is marked as being used. classUsed = true; innerClassesInfo.innerClassConstantAccept(clazz, this); innerClassesInfoUsed = classUsed; // Check if the outer class (if any) is marked as being used. classUsed = true; innerClassesInfo.outerClassConstantAccept(clazz, this); innerClassesInfoUsed &= classUsed; // If both the inner class and the outer class are marked as being // used, then mark this InnerClassesInfo as well. if (innerClassesInfoUsed) { usageMarker.markAsUsed(innerClassesInfo); innerClassesInfo.innerNameConstantAccept(clazz, this); } } // The return value. attributeUsed |= innerClassesInfoUsed; }
Example #15
Source File: UsageMarker.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // At this point, we only mark outer classes of this class. // Inner class can be marked later, by InnerUsageMarker. if (innerClassesInfo.u2innerClassIndex != 0 && clazz.getName().equals(clazz.getClassName(innerClassesInfo.u2innerClassIndex))) { markAsUsed(innerClassesInfo); innerClassesInfo.innerClassConstantAccept(clazz, this); innerClassesInfo.outerClassConstantAccept(clazz, this); innerClassesInfo.innerNameConstantAccept(clazz, this); } }
Example #16
Source File: RetargetedInnerClassAttributeRemover.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Check whether the class itself is retargeted. checkTarget(clazz); if (!retargeted) { // Check whether the referenced classes are retargeted. innerClassesAttribute.innerClassEntriesAccept(clazz, this); int classesCount = innerClassesAttribute.u2classesCount; InnerClassesInfo[] classes = innerClassesAttribute.classes; int newClassesCount = 0; // Copy over all non-retargeted attributes. for (int index = 0; index < classesCount; index++) { InnerClassesInfo classInfo = classes[index]; // Check if the outer class or inner class is a retargeted class. retargeted = false; classInfo.outerClassConstantAccept(clazz, this); classInfo.innerClassConstantAccept(clazz, this); if (!retargeted) { classes[newClassesCount++] = classInfo; } } // Clean up any remaining array elements. for (int index = newClassesCount; index < classesCount; index++) { classes[index] = null; } // Update the number of classes. innerClassesAttribute.u2classesCount = newClassesCount; // Remove the attribute altogether if it's empty. retargeted = newClassesCount == 0; } }
Example #17
Source File: RetargetedInnerClassAttributeRemover.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { // Check whether the inner class or the outer class are retargeted. innerClassesInfo.innerClassConstantAccept(clazz, this); innerClassesInfo.outerClassConstantAccept(clazz, this); }
Example #18
Source File: ClassCleaner.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo) { clean(innerClassesInfo); }
Example #19
Source File: InnerClassesInfoVisitor.java From java-n-IDE-for-Android with Apache License 2.0 | votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo);
Example #20
Source File: InnerClassesInfoVisitor.java From proguard with GNU General Public License v2.0 | votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo);
Example #21
Source File: InnerClassesInfoVisitor.java From bazel with Apache License 2.0 | votes |
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo);