1 25 26 package org.netbeans.modules.classfile; 27 28 import java.io.DataInputStream ; 29 import java.io.IOException ; 30 31 36 public class AnnotationComponent { 37 String name; 38 ElementValue value; 39 40 static AnnotationComponent load(DataInputStream in, ConstantPool pool, 41 boolean runtimeVisible) 42 throws IOException { 43 int iName = in.readUnsignedShort(); 44 String name = ((CPName)pool.get(iName)).getName(); 45 ElementValue value = ElementValue.load(in, pool, runtimeVisible); 46 return new AnnotationComponent(name, value); 47 } 48 49 AnnotationComponent(String name, ElementValue value) { 50 this.name = name; 51 this.value = value; 52 } 53 54 57 public final String getName() { 58 return name; 59 } 60 61 64 public final ElementValue getValue() { 65 return value; 66 } 67 68 public String toString() { 69 return "name=" + name + ", value=" + value; 70 } 71 } 72 | Popular Tags |