1 30 package com.tc.asm.tree; 31 32 import java.util.ArrayList ; 33 import java.util.List ; 34 35 import com.tc.asm.AnnotationVisitor; 36 import com.tc.asm.Attribute; 37 38 43 public abstract class MemberNode { 44 45 52 public List visibleAnnotations; 53 54 61 public List invisibleAnnotations; 62 63 69 public List attrs; 70 71 74 public MemberNode() { 75 } 76 77 84 public AnnotationVisitor visitAnnotation( 85 final String desc, 86 final boolean visible) 87 { 88 AnnotationNode an = new AnnotationNode(desc); 89 if (visible) { 90 if (visibleAnnotations == null) { 91 visibleAnnotations = new ArrayList (1); 92 } 93 visibleAnnotations.add(an); 94 } else { 95 if (invisibleAnnotations == null) { 96 invisibleAnnotations = new ArrayList (1); 97 } 98 invisibleAnnotations.add(an); 99 } 100 return an; 101 } 102 103 108 public void visitAttribute(final Attribute attr) { 109 if (attrs == null) { 110 attrs = new ArrayList (1); 111 } 112 attrs.add(attr); 113 } 114 115 118 public void visitEnd() { 119 } 120 } 121 | Popular Tags |