Java 类org.objectweb.asm.util.attrs.ASMStackMapTableAttribute 实例源码

项目:annotation-tools    文件:StackMapTableAttributeTest.java   
public void test() throws Exception {
    Attribute[] attributes = new Attribute[] { new ASMStackMapTableAttribute() };

    ClassWriter cw = new ClassWriter(false);

    ClassReader cr1 = new ClassReader(is);
    cr1.accept(cw, attributes, true);

    ClassReader cr2 = new ClassReader(cw.toByteArray());

    if (!Arrays.equals(cr1.b, cr2.b)) {
        StringWriter sw1 = new StringWriter();
        StringWriter sw2 = new StringWriter();
        ClassVisitor cv1 = new TraceClassVisitor(new PrintWriter(sw1));
        ClassVisitor cv2 = new TraceClassVisitor(new PrintWriter(sw2));
        cr1.accept(cv1, attributes, true);
        cr2.accept(cv2, attributes, true);
        assertEquals("different data", sw1.toString(), sw2.toString());
    }

}
项目:javify    文件:AbstractVisitor.java   
/**
 * Returns the default {@link ASMifiable} prototypes.
 *
 * @return the default {@link ASMifiable} prototypes.
 */
public static Attribute[] getDefaultAttributes() {
    try {
        return new Attribute[] {
            new ASMStackMapAttribute(),
            new ASMStackMapTableAttribute() };
    } catch (Exception e) {
        return new Attribute[0];
    }
}
项目:jvm-stm    文件:AbstractVisitor.java   
/**
 * Returns the default {@link ASMifiable} prototypes.
 * 
 * @return the default {@link ASMifiable} prototypes.
 */
public static Attribute[] getDefaultAttributes() {
    try {
        return new Attribute[] {
            new ASMStackMapAttribute(),
            new ASMStackMapTableAttribute() };
    } catch (Exception e) {
        return new Attribute[0];
    }
}
项目:annotation-tools    文件:AbstractVisitor.java   
/**
 * Returns the default {@link ASMifiable} prototypes.
 * 
 * @return the default {@link ASMifiable} prototypes.
 */
public static Attribute[] getDefaultAttributes() {
    try {
        return new Attribute[] {
            new ASMStackMapAttribute(),
            new ASMStackMapTableAttribute() };
    } catch (Exception e) {
        return new Attribute[0];
    }
}
项目:JamVM-PH    文件:AbstractVisitor.java   
/**
 * Returns the default {@link ASMifiable} prototypes.
 * 
 * @return the default {@link ASMifiable} prototypes.
 */
public static Attribute[] getDefaultAttributes() {
    try {
        return new Attribute[] {
            new ASMStackMapAttribute(),
            new ASMStackMapTableAttribute() };
    } catch (Exception e) {
        return new Attribute[0];
    }
}
项目:classpath    文件:AbstractVisitor.java   
/**
 * Returns the default {@link ASMifiable} prototypes.
 *
 * @return the default {@link ASMifiable} prototypes.
 */
public static Attribute[] getDefaultAttributes() {
    try {
        return new Attribute[] {
            new ASMStackMapAttribute(),
            new ASMStackMapTableAttribute() };
    } catch (Exception e) {
        return new Attribute[0];
    }
}