private Object readAnnotationValue(DataInputStream bytes) throws IOException { char tag = (char) bytes.readUnsignedByte(); if (DEBUG) System.out.println("tag: " + tag); switch(tag) { case '[': int sz = bytes.readUnsignedShort(); if (DEBUG) System.out.println("Array of " + sz + " entries"); Object [] result = new Object[sz]; for(int i = 0; i < sz; i++) result[i] = readAnnotationValue(bytes); return result; case 'B': case 'C': case 'D': case 'F': case 'I': case 'J': case 'S': case 'Z': case 's': int cp_index = bytes.readUnsignedShort(); Constant c  =  getConstantPool().getConstant(cp_index); switch(tag) { case 'B': return new Byte( (byte) ((ConstantInteger)c).getBytes()); case 'C': return new Character( (char) ((ConstantInteger)c).getBytes()); case 'D': return new Double( ((ConstantDouble)c).getBytes()); case 'F': return new Float( ((ConstantFloat)c).getBytes()); case 'I': return new Integer( ((ConstantInteger)c).getBytes()); case 'J': return new Long( ((ConstantLong)c).getBytes()); case 'S': return new Character( (char) ((ConstantInteger)c).getBytes()); case 'Z': return Boolean.valueOf( ((ConstantInteger)c).getBytes() != 0); case 's': return ((ConstantUtf8)c).getBytes(); default: throw new IllegalStateException("Impossible");
private Object readAnnotationValue(DataInputStream bytes) throws IOException { char tag = (char) bytes.readUnsignedByte(); if (DEBUG) System.out.println("tag: " + tag); switch (tag) { case '[': int sz = bytes.readUnsignedShort(); if (DEBUG) System.out.println("Array of " + sz + " entries"); Object[] result = new Object[sz]; for (int i = 0; i < sz; i++) result[i] = readAnnotationValue(bytes); return result; case 'B': case 'C': case 'D': case 'F': case 'I': case 'J': case 'S': case 'Z': case 's': int cp_index = bytes.readUnsignedShort(); Constant c = getConstantPool().getConstant(cp_index); switch (tag) { case 'B': return new Byte((byte) ((ConstantInteger) c).getBytes()); case 'C': return new Character((char) ((ConstantInteger) c).getBytes()); case 'D': return new Double(((ConstantDouble) c).getBytes()); case 'F': return new Float(((ConstantFloat) c).getBytes()); case 'I': return new Integer(((ConstantInteger) c).getBytes()); case 'J': return new Long(((ConstantLong) c).getBytes()); case 'S': return new Character((char) ((ConstantInteger) c).getBytes()); case 'Z': return Boolean.valueOf(((ConstantInteger) c).getBytes() != 0); case 's': return ((ConstantUtf8) c).getBytes(); default: throw new IllegalStateException("Impossible"); } default: throw new IllegalArgumentException(); }
    private Object readAnnotationValue(DataInputStream bytes) throws IOException {        char tag = (char) bytes.readUnsignedByte();                if (DEBUG)         System.out.println("tag: " + tag);        switch(tag) {        case '[':            int sz = bytes.readUnsignedShort();                if (DEBUG)             System.out.println("Array of " + sz + " entries");            Object [] result = new Object[sz];            for(int i = 0; i < sz; i++)                result[i] = readAnnotationValue(bytes);            return result;        case 'B':         case 'C':         case 'D':         case 'F':         case 'I':         case 'J':         case 'S':         case 'Z':         case 's':             int cp_index = bytes.readUnsignedShort();            Constant c  =  getConstantPool().getConstant(cp_index);	    switch(tag) {        case 'B': 		return new Byte(            		(byte) ((ConstantInteger)c).getBytes());        case 'C': 		return new Character(            		(char) ((ConstantInteger)c).getBytes());        case 'D': 		return new Double(            		((ConstantDouble)c).getBytes());        case 'F': 		return new Float(            		((ConstantFloat)c).getBytes());        case 'I': 		return new Integer(            		((ConstantInteger)c).getBytes());        case 'J': 		return new Long(            		((ConstantLong)c).getBytes());        case 'S': 		return new Character(            		(char) ((ConstantInteger)c).getBytes());        case 'Z': 		return Boolean.valueOf(            		((ConstantInteger)c).getBytes() != 0);        case 's':             return ((ConstantUtf8)c).getBytes();	default: throw new IllegalStateException("Impossible");	}        default:             throw new IllegalArgumentException();        }    }