@Override public void dump(DataOutputStream dos) throws IOException { dos.writeByte(type); // u1 kind of value switch (type) { case PRIMITIVE_INT: case PRIMITIVE_BYTE: case PRIMITIVE_CHAR: case PRIMITIVE_FLOAT: case PRIMITIVE_LONG: case PRIMITIVE_BOOLEAN: case PRIMITIVE_SHORT: case PRIMITIVE_DOUBLE: case STRING: dos.writeShort(getIndex()); break; default: throw new RuntimeException( "SimpleElementValue doesnt know how to write out type " + type); } } }
@Override public String toString() { return stringifyValue(); }
return new SimpleElementValue(PRIMITIVE_BYTE, dis .readUnsignedShort(), cpool); case 'C': // char return new SimpleElementValue(PRIMITIVE_CHAR, dis .readUnsignedShort(), cpool); case 'D': // double return new SimpleElementValue(PRIMITIVE_DOUBLE, dis .readUnsignedShort(), cpool); case 'F': // float return new SimpleElementValue(PRIMITIVE_FLOAT, dis .readUnsignedShort(), cpool); case 'I': // int return new SimpleElementValue(PRIMITIVE_INT, dis .readUnsignedShort(), cpool); case 'J': // long return new SimpleElementValue(PRIMITIVE_LONG, dis .readUnsignedShort(), cpool); case 'S': // short return new SimpleElementValue(PRIMITIVE_SHORT, dis .readUnsignedShort(), cpool); case 'Z': // boolean return new SimpleElementValue(PRIMITIVE_BOOLEAN, dis .readUnsignedShort(), cpool); case 's': // String return new SimpleElementValue(STRING, dis.readUnsignedShort(), cpool); case 'e': // Enum constant
return new SimpleElementValue(PRIMITIVE_BYTE, dis .readUnsignedShort(), cpool); case 'C': // char return new SimpleElementValue(PRIMITIVE_CHAR, dis .readUnsignedShort(), cpool); case 'D': // double return new SimpleElementValue(PRIMITIVE_DOUBLE, dis .readUnsignedShort(), cpool); case 'F': // float return new SimpleElementValue(PRIMITIVE_FLOAT, dis .readUnsignedShort(), cpool); case 'I': // int return new SimpleElementValue(PRIMITIVE_INT, dis .readUnsignedShort(), cpool); case 'J': // long return new SimpleElementValue(PRIMITIVE_LONG, dis .readUnsignedShort(), cpool); case 'S': // short return new SimpleElementValue(PRIMITIVE_SHORT, dis .readUnsignedShort(), cpool); case 'Z': // boolean return new SimpleElementValue(PRIMITIVE_BOOLEAN, dis .readUnsignedShort(), cpool); case 's': // String return new SimpleElementValue(STRING, dis.readUnsignedShort(), cpool); case 'e': // Enum constant
@Override public void dump(DataOutputStream dos) throws IOException { dos.writeByte(type); // u1 kind of value switch (type) { case PRIMITIVE_INT: case PRIMITIVE_BYTE: case PRIMITIVE_CHAR: case PRIMITIVE_FLOAT: case PRIMITIVE_LONG: case PRIMITIVE_BOOLEAN: case PRIMITIVE_SHORT: case PRIMITIVE_DOUBLE: case STRING: dos.writeShort(getIndex()); break; default: throw new RuntimeException( "SimpleElementValue doesnt know how to write out type " + type); } } }
return new SimpleElementValue(PRIMITIVE_BYTE, dis .readUnsignedShort(), cpool); case 'C': // char return new SimpleElementValue(PRIMITIVE_CHAR, dis .readUnsignedShort(), cpool); case 'D': // double return new SimpleElementValue(PRIMITIVE_DOUBLE, dis .readUnsignedShort(), cpool); case 'F': // float return new SimpleElementValue(PRIMITIVE_FLOAT, dis .readUnsignedShort(), cpool); case 'I': // int return new SimpleElementValue(PRIMITIVE_INT, dis .readUnsignedShort(), cpool); case 'J': // long return new SimpleElementValue(PRIMITIVE_LONG, dis .readUnsignedShort(), cpool); case 'S': // short return new SimpleElementValue(PRIMITIVE_SHORT, dis .readUnsignedShort(), cpool); case 'Z': // boolean return new SimpleElementValue(PRIMITIVE_BOOLEAN, dis .readUnsignedShort(), cpool); case 's': // String return new SimpleElementValue(STRING, dis.readUnsignedShort(), cpool); case 'e': // Enum constant
@Override public String toString() { return stringifyValue(); }
@Override public void dump(DataOutputStream dos) throws IOException { dos.writeByte(type); // u1 kind of value switch (type) { case PRIMITIVE_INT: case PRIMITIVE_BYTE: case PRIMITIVE_CHAR: case PRIMITIVE_FLOAT: case PRIMITIVE_LONG: case PRIMITIVE_BOOLEAN: case PRIMITIVE_SHORT: case PRIMITIVE_DOUBLE: case STRING: dos.writeShort(getIndex()); break; default: throw new RuntimeException( "SimpleElementValue doesnt know how to write out type " + type); } } }
return new SimpleElementValue(PRIMITIVE_BYTE, dis .readUnsignedShort(), cpool); case 'C': // char return new SimpleElementValue(PRIMITIVE_CHAR, dis .readUnsignedShort(), cpool); case 'D': // double return new SimpleElementValue(PRIMITIVE_DOUBLE, dis .readUnsignedShort(), cpool); case 'F': // float return new SimpleElementValue(PRIMITIVE_FLOAT, dis .readUnsignedShort(), cpool); case 'I': // int return new SimpleElementValue(PRIMITIVE_INT, dis .readUnsignedShort(), cpool); case 'J': // long return new SimpleElementValue(PRIMITIVE_LONG, dis .readUnsignedShort(), cpool); case 'S': // short return new SimpleElementValue(PRIMITIVE_SHORT, dis .readUnsignedShort(), cpool); case 'Z': // boolean return new SimpleElementValue(PRIMITIVE_BOOLEAN, dis .readUnsignedShort(), cpool); case 's': // String return new SimpleElementValue(STRING, dis.readUnsignedShort(), cpool); case 'e': // Enum constant
@Override public String toString() { return stringifyValue(); }
ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Constants.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Constants.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Constants.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Constants.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: ConstantInteger bo = (ConstantInteger) cpool.getConstant(
case PRIMITIVE_BOOLEAN: case STRING: return new SimpleElementValue(type, input.readUnsignedShort(), cpool);
ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Constants.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Constants.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Constants.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Constants.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: ConstantInteger bo = (ConstantInteger) cpool.getConstant(
ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Constants.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Constants.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Constants.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Constants.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: ConstantInteger bo = (ConstantInteger) cpool.getConstant(
ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Constants.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Constants.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Constants.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Constants.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Constants.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: ConstantInteger bo = (ConstantInteger) cpool.getConstant(
final ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(c.getBytes()); case PRIMITIVE_LONG: final ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(), Const.CONSTANT_Long); return Long.toString(j.getBytes()); case PRIMITIVE_DOUBLE: final ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(), Const.CONSTANT_Double); return Double.toString(d.getBytes()); case PRIMITIVE_FLOAT: final ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(), Const.CONSTANT_Float); return Float.toString(f.getBytes()); case PRIMITIVE_SHORT: final ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(s.getBytes()); case PRIMITIVE_BYTE: final ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(), Const.CONSTANT_Integer); return Integer.toString(b.getBytes()); case PRIMITIVE_CHAR: final ConstantInteger ch = (ConstantInteger) cpool.getConstant( getIndex(), Const.CONSTANT_Integer); return String.valueOf((char)ch.getBytes()); case PRIMITIVE_BOOLEAN: final ConstantInteger bo = (ConstantInteger) cpool.getConstant(