当前位置: 首页>>代码示例>>Java>>正文


Java ExceptionsAttribute类代码示例

本文整理汇总了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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:19,代码来源:AttributeAdder.java

示例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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:10,代码来源:UsageMarker.java

示例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);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:RequiredAttributeFilter.java

示例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);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:NonEmptyAttributeFilter.java

示例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);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:MultiAttributeVisitor.java

示例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);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:AttributeNameFilter.java

示例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();
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:10,代码来源:ClassPrinter.java

示例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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:11,代码来源:ExceptionAdder.java

示例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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:10,代码来源:ConstantPoolRemapper.java

示例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]);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:11,代码来源:ProgramClassWriter.java

示例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();
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:12,代码来源:ProgramClassReader.java

示例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;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:32,代码来源:ProgramClassReader.java

示例13: visitExceptionsAttribute

import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
    clean(exceptionsAttribute);

    exceptionsAttribute.exceptionEntriesAccept((ProgramClass)clazz, this);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:7,代码来源:ClassCleaner.java

示例14: visitExceptionsAttribute

import proguard.classfile.attribute.ExceptionsAttribute; //导入依赖的package包/类
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
{
    visitAnyAttribute(clazz, exceptionsAttribute);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:SimplifiedVisitor.java

示例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;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:9,代码来源:ExceptionsAttributeEditor.java


注:本文中的proguard.classfile.attribute.ExceptionsAttribute类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。