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.RuntimeVisibleAnnotations; 39 40 45 46 public class ASMRuntimeVisibleAnnotations extends RuntimeVisibleAnnotations 47 implements ASMifiable 48 { 49 50 protected Attribute read (ClassReader cr, int off, 51 int len, char[] buf, int codeOff, Label[] labels) 52 { 53 RuntimeVisibleAnnotations attr = 54 (RuntimeVisibleAnnotations)super.read( 55 cr, off, len, buf, codeOff, labels); 56 57 ASMRuntimeVisibleAnnotations result = new ASMRuntimeVisibleAnnotations(); 58 result.annotations = attr.annotations; 59 return result; 60 } 61 62 public void asmify (StringBuffer buf, String varName, Map labelNames) { 63 buf.append("RuntimeVisibleAnnotations ").append(varName) 64 .append(" = new RuntimeVisibleAnnotations();\n"); 65 ASMAnnotationDefaultAttribute.asmifyAnnotations(buf, varName, annotations); 66 } 67 } 68 | Popular Tags |