1 30 31 package oracle.toplink.libraries.asm.util.attrs; 32 33 import java.util.Map ; 34 35 import oracle.toplink.libraries.asm.Attribute; 36 import oracle.toplink.libraries.asm.ClassReader; 37 import oracle.toplink.libraries.asm.Label; 38 import oracle.toplink.libraries.asm.attrs.SignatureAttribute; 39 40 45 46 public class ASMSignatureAttribute extends SignatureAttribute 47 implements ASMifiable 48 { 49 50 protected Attribute read (ClassReader cr, int off, 51 int len, char[] buf, int codeOff, Label[] labels) 52 { 53 SignatureAttribute attr = 54 (SignatureAttribute)super.read(cr, off, len, buf, codeOff, labels); 55 56 ASMSignatureAttribute result = new ASMSignatureAttribute(); 57 result.signature = attr.signature; 58 return result; 59 } 60 61 public void asmify (StringBuffer buf, String varName, Map labelNames) { 62 buf.append("SignatureAttribute ").append(varName) 63 .append(" = new SignatureAttribute(\"") 64 .append(signature).append("\");\n"); 65 } 66 } 67 | Popular Tags |