1 21 package proguard.classfile.attribute.preverification; 22 23 import proguard.classfile.*; 24 import proguard.classfile.attribute.*; 25 import proguard.classfile.attribute.preverification.visitor.StackMapFrameVisitor; 26 import proguard.classfile.attribute.visitor.AttributeVisitor; 27 28 33 public class StackMapAttribute extends Attribute 34 { 35 public int u2stackMapFramesCount; 36 public FullFrame[] stackMapFrames; 37 38 39 42 public StackMapAttribute() 43 { 44 } 45 46 47 50 public StackMapAttribute(FullFrame[] stackMapFrames) 51 { 52 this(stackMapFrames.length, stackMapFrames); 53 } 54 55 56 59 public StackMapAttribute(int stackMapFramesCount, 60 FullFrame[] stackMapFrames) 61 { 62 this.u2stackMapFramesCount = stackMapFramesCount; 63 this.stackMapFrames = stackMapFrames; 64 } 65 66 67 68 69 71 public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor) 72 { 73 attributeVisitor.visitStackMapAttribute(clazz, method, codeAttribute, this); 74 } 75 76 77 80 public void stackMapFramesAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapFrameVisitor stackMapFrameVisitor) 81 { 82 for (int index = 0; index < u2stackMapFramesCount; index++) 83 { 84 FullFrame stackMapFrame = stackMapFrames[index]; 85 86 stackMapFrameVisitor.visitFullFrame(clazz, method, codeAttribute, stackMapFrame.getOffsetDelta(), stackMapFrame); 89 } 90 } 91 } 92 | Popular Tags |