1 30 31 package oracle.toplink.libraries.asm.attrs; 32 33 import oracle.toplink.libraries.asm.Attribute; 34 import oracle.toplink.libraries.asm.ByteVector; 35 import oracle.toplink.libraries.asm.ClassReader; 36 import oracle.toplink.libraries.asm.ClassWriter; 37 import oracle.toplink.libraries.asm.Label; 38 39 90 91 public class SignatureAttribute extends Attribute { 92 93 public String signature; 94 95 public SignatureAttribute () { 96 super("Signature"); 97 } 98 99 public SignatureAttribute (String signature) { 100 this(); 101 this.signature = signature; 102 } 103 104 protected Attribute read (ClassReader cr, int off, 105 int len, char[] buf, int codeOff, Label[] labels) { 106 return new SignatureAttribute(cr.readUTF8(off, buf)); 107 } 108 109 protected ByteVector write (ClassWriter cw, byte[] code, 110 int len, int maxStack, int maxLocals) { 111 return new ByteVector().putShort(cw.newUTF8(signature)); 112 } 113 114 public String toString () { 115 return signature; 116 } 117 } 118 | Popular Tags |