1 21 package proguard.classfile.attribute.preverification; 22 23 import proguard.classfile.*; 24 import proguard.classfile.attribute.CodeAttribute; 25 import proguard.classfile.attribute.preverification.visitor.*; 26 27 33 public class SameOneFrame extends StackMapFrame 34 { 35 public VerificationType stackItem; 36 37 38 41 public SameOneFrame() 42 { 43 } 44 45 46 49 public SameOneFrame(int tag) 50 { 51 u2offsetDelta = tag - SAME_ONE_FRAME; 52 } 53 54 55 58 public SameOneFrame(VerificationType stackItem) 59 { 60 this.stackItem = stackItem; 61 } 62 63 64 67 public void stackItemAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationTypeVisitor verificationTypeVisitor) 68 { 69 stackItem.accept(clazz, method, codeAttribute, offset, verificationTypeVisitor); 70 } 71 72 73 75 public int getTag() 76 { 77 return u2offsetDelta < 64 ? 78 SAME_ONE_FRAME + u2offsetDelta : 79 SAME_ONE_FRAME_EXTENDED; 80 } 81 82 83 public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrameVisitor stackMapFrameVisitor) 84 { 85 stackMapFrameVisitor.visitSameOneFrame(clazz, method, codeAttribute, offset, this); 86 } 87 88 89 91 public boolean equals(Object object) 92 { 93 if (!super.equals(object)) 94 { 95 return false; 96 } 97 98 SameOneFrame other = (SameOneFrame)object; 99 100 return this.u2offsetDelta == other.u2offsetDelta && 101 this.stackItem.equals(other.stackItem); 102 } 103 104 105 public int hashCode() 106 { 107 return super.hashCode() ^ stackItem.hashCode(); 108 } 109 110 111 public String toString() 112 { 113 return super.toString()+"Var: ..., Stack: ["+stackItem.toString()+"]"; 114 } 115 } 116 | Popular Tags |