home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- import java.io.DataOutputStream;
- import java.io.IOException;
-
- class ProxyGenerator$ConstantPool$ValueEntry extends ProxyGenerator.ConstantPool.Entry {
- private Object value;
-
- public ProxyGenerator$ConstantPool$ValueEntry(Object var1) {
- super((ProxyGenerator.1)null);
- this.value = var1;
- }
-
- public void write(DataOutputStream var1) throws IOException {
- if (this.value instanceof String) {
- var1.writeByte(1);
- var1.writeUTF((String)this.value);
- } else if (this.value instanceof Integer) {
- var1.writeByte(3);
- var1.writeInt((Integer)this.value);
- } else if (this.value instanceof Float) {
- var1.writeByte(4);
- var1.writeFloat((Float)this.value);
- } else if (this.value instanceof Long) {
- var1.writeByte(5);
- var1.writeLong((Long)this.value);
- } else {
- if (!(this.value instanceof Double)) {
- throw new InternalError("bogus value entry: " + this.value);
- }
-
- var1.writeDouble((double)6.0F);
- var1.writeDouble((Double)this.value);
- }
-
- }
- }
-