本文整理汇总了Java中proguard.classfile.attribute.ExceptionsAttribute类的典型用法代码示例。如果您正苦于以下问题:Java ExceptionsAttribute类的具体用法?Java ExceptionsAttribute怎么用?Java ExceptionsAttribute使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExceptionsAttribute类属于proguard.classfile.attribute包,在下文中一共展示了ExceptionsAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
// Create a new exceptions attribute.
ExceptionsAttribute newExceptionsAttribute =
new ExceptionsAttribute(constantAdder.addConstant(clazz, exceptionsAttribute.u2attributeNameIndex),
0,
exceptionsAttribute.u2exceptionIndexTableLength > 0 ?
new int[exceptionsAttribute.u2exceptionIndexTableLength] :
EMPTY_INTS);
// Add the exceptions.
exceptionsAttribute.exceptionEntriesAccept((ProgramClass)clazz,
new ExceptionAdder(targetClass,
newExceptionsAttribute));
// Add it to the target method.
attributesEditor.addAttribute(newExceptionsAttribute);
}
示例2: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
markAsUsed(exceptionsAttribute);
markConstant(clazz, exceptionsAttribute.u2attributeNameIndex);
// Mark the constant pool entries referenced by the exceptions.
exceptionsAttribute.exceptionEntriesAccept((ProgramClass)clazz, this);
}
示例3: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
if (optionalAttributeVisitor != null)
{
exceptionsAttribute.accept(clazz, method, optionalAttributeVisitor);
}
}
示例4: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
if (exceptionsAttribute.u2exceptionIndexTableLength > 0)
{
exceptionsAttribute.accept(clazz, method, attributeVisitor);
}
}
示例5: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
for (int index = 0; index < attributeVisitors.length; index++)
{
attributeVisitors[index].visitExceptionsAttribute(clazz, method, exceptionsAttribute);
}
}
示例6: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
if (accepted(clazz, exceptionsAttribute))
{
exceptionsAttribute.accept(clazz, method, attributeVisitor);
}
}
示例7: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
println(visitorInfo(exceptionsAttribute) +
" Exceptions attribute (count = " + exceptionsAttribute.u2exceptionIndexTableLength + ")");
indent();
exceptionsAttribute.exceptionEntriesAccept((ProgramClass)clazz, this);
outdent();
}
示例8: ExceptionAdder
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
/**
* Creates a new ExceptionAdder that will copy classes into the given
* target exceptions attribute.
*/
public ExceptionAdder(ProgramClass targetClass,
ExceptionsAttribute targetExceptionsAttribute)
{
constantAdder = new ConstantAdder(targetClass);
exceptionsAttributeEditor = new ExceptionsAttributeEditor(targetExceptionsAttribute);
}
示例9: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
exceptionsAttribute.u2attributeNameIndex =
remapConstantIndex(exceptionsAttribute.u2attributeNameIndex);
// Remap the constant pool references of the exceptions.
remapConstantIndexArray(exceptionsAttribute.u2exceptionIndexTable,
exceptionsAttribute.u2exceptionIndexTableLength);
}
示例10: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
// Write the exceptions.
dataOutput.writeShort(exceptionsAttribute.u2exceptionIndexTableLength);
for (int index = 0; index < exceptionsAttribute.u2exceptionIndexTableLength; index++)
{
dataOutput.writeShort(exceptionsAttribute.u2exceptionIndexTable[index]);
}
}
示例11: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
// Read the exceptions.
exceptionsAttribute.u2exceptionIndexTableLength = dataInput.readUnsignedShort();
exceptionsAttribute.u2exceptionIndexTable = new int[exceptionsAttribute.u2exceptionIndexTableLength];
for (int index = 0; index < exceptionsAttribute.u2exceptionIndexTableLength; index++)
{
exceptionsAttribute.u2exceptionIndexTable[index] = dataInput.readUnsignedShort();
}
}
示例12: createAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
private Attribute createAttribute(Clazz clazz)
{
int u2attributeNameIndex = dataInput.readUnsignedShort();
int u4attributeLength = dataInput.readInt();
String attributeName = clazz.getString(u2attributeNameIndex);
Attribute attribute =
attributeName.equals(ClassConstants.ATTR_SourceFile) ? (Attribute)new SourceFileAttribute():
attributeName.equals(ClassConstants.ATTR_SourceDir) ? (Attribute)new SourceDirAttribute():
attributeName.equals(ClassConstants.ATTR_InnerClasses) ? (Attribute)new InnerClassesAttribute():
attributeName.equals(ClassConstants.ATTR_EnclosingMethod) ? (Attribute)new EnclosingMethodAttribute():
attributeName.equals(ClassConstants.ATTR_Deprecated) ? (Attribute)new DeprecatedAttribute():
attributeName.equals(ClassConstants.ATTR_Synthetic) ? (Attribute)new SyntheticAttribute():
attributeName.equals(ClassConstants.ATTR_Signature) ? (Attribute)new SignatureAttribute():
attributeName.equals(ClassConstants.ATTR_ConstantValue) ? (Attribute)new ConstantValueAttribute():
attributeName.equals(ClassConstants.ATTR_Exceptions) ? (Attribute)new ExceptionsAttribute():
attributeName.equals(ClassConstants.ATTR_Code) ? (Attribute)new CodeAttribute():
attributeName.equals(ClassConstants.ATTR_StackMap) ? (Attribute)new StackMapAttribute():
attributeName.equals(ClassConstants.ATTR_StackMapTable) ? (Attribute)new StackMapTableAttribute():
attributeName.equals(ClassConstants.ATTR_LineNumberTable) ? (Attribute)new LineNumberTableAttribute():
attributeName.equals(ClassConstants.ATTR_LocalVariableTable) ? (Attribute)new LocalVariableTableAttribute():
attributeName.equals(ClassConstants.ATTR_LocalVariableTypeTable) ? (Attribute)new LocalVariableTypeTableAttribute():
attributeName.equals(ClassConstants.ATTR_RuntimeVisibleAnnotations) ? (Attribute)new RuntimeVisibleAnnotationsAttribute():
attributeName.equals(ClassConstants.ATTR_RuntimeInvisibleAnnotations) ? (Attribute)new RuntimeInvisibleAnnotationsAttribute():
attributeName.equals(ClassConstants.ATTR_RuntimeVisibleParameterAnnotations) ? (Attribute)new RuntimeVisibleParameterAnnotationsAttribute():
attributeName.equals(ClassConstants.ATTR_RuntimeInvisibleParameterAnnotations) ? (Attribute)new RuntimeInvisibleParameterAnnotationsAttribute():
attributeName.equals(ClassConstants.ATTR_AnnotationDefault) ? (Attribute)new AnnotationDefaultAttribute():
(Attribute)new UnknownAttribute(u4attributeLength);
attribute.u2attributeNameIndex = u2attributeNameIndex;
return attribute;
}
示例13: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
clean(exceptionsAttribute);
exceptionsAttribute.exceptionEntriesAccept((ProgramClass)clazz, this);
}
示例14: visitExceptionsAttribute
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
visitAnyAttribute(clazz, exceptionsAttribute);
}
示例15: ExceptionsAttributeEditor
import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
/**
* Creates a new ExceptionsAttributeEditor that will edit exceptions in the
* given exceptions attribute.
*/
public ExceptionsAttributeEditor(ExceptionsAttribute targetExceptionsAttribute)
{
this.targetExceptionsAttribute = targetExceptionsAttribute;
}