1 32 package net.sf.retrotranslator.runtime.impl; 33 34 import java.util.*; 35 import net.sf.retrotranslator.runtime.asm.AnnotationVisitor; 36 37 40 public class AnnotationArray implements AnnotationVisitor { 41 42 private final List<Object > values = new ArrayList<Object >(); 43 44 public AnnotationArray() { 45 } 46 47 public List<Object > getValues() { 48 return values; 49 } 50 51 public void visit(String name, Object value) { 52 values.add(value); 53 } 54 55 public void visitEnum(String name, String desc, String value) { 56 values.add(new EnumValue(desc, value)); 57 } 58 59 public AnnotationVisitor visitAnnotation(String name, String desc) { 60 AnnotationValue value = new AnnotationValue(desc); 61 values.add(value); 62 return value; 63 } 64 65 public AnnotationVisitor visitArray(String name) { 66 AnnotationArray array = new AnnotationArray(); 67 values.add(array); 68 return array; 69 } 70 71 public void visitEnd() { 72 } 73 74 } 75 | Popular Tags |