本文整理汇总了Java中proguard.classfile.attribute.InnerClassesInfo类的典型用法代码示例。如果您正苦于以下问题:Java InnerClassesInfo类的具体用法?Java InnerClassesInfo怎么用?Java InnerClassesInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InnerClassesInfo类属于proguard.classfile.attribute包,在下文中一共展示了InnerClassesInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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);
}
}
示例2: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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));
}
}
}
示例3: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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);
}
}
}
示例4: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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);
}
}
示例5: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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;
}
示例6: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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();
}
示例7: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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;
}
示例8: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
{
dataOutput.writeShort(innerClassesInfo.u2innerClassIndex);
dataOutput.writeShort(innerClassesInfo.u2outerClassIndex);
dataOutput.writeShort(innerClassesInfo.u2innerNameIndex);
dataOutput.writeShort(innerClassesInfo.u2innerClassAccessFlags);
}
示例9: visitInnerClassesAttribute
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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;
}
}
示例10: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
{
innerClassesInfo.u2innerClassIndex = dataInput.readUnsignedShort();
innerClassesInfo.u2outerClassIndex = dataInput.readUnsignedShort();
innerClassesInfo.u2innerNameIndex = dataInput.readUnsignedShort();
innerClassesInfo.u2innerClassAccessFlags = dataInput.readUnsignedShort();
}
示例11: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
{
if (innerClassesInfo.u2innerNameIndex != 0)
{
markCpUtf8Entry(clazz, innerClassesInfo.u2innerNameIndex);
}
}
示例12: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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);
}
}
示例13: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
{
clean(innerClassesInfo);
}
示例14: visitInnerClassesAttribute
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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;
}
}
示例15: visitInnerClassesInfo
import proguard.classfile.attribute.InnerClassesInfo; //导入依赖的package包/类
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);
}