1 21 22 package org.apache.derby.iapi.services.classfile; 23 24 import org.apache.derby.iapi.services.classfile.VMDescriptor; 25 import java.io.IOException ; 26 27 28 final class CONSTANT_Long_info extends ConstantPoolEntry { 29 private final long value; 30 31 CONSTANT_Long_info(long value) { 32 super(VMDescriptor.CONSTANT_Long); 33 doubleSlot = true; this.value = value; 35 } 36 37 public int hashCode() { 38 return (int) value; 39 } 40 41 public boolean equals(Object other) { 42 43 if (other instanceof CONSTANT_Long_info) { 45 46 return value == ((CONSTANT_Long_info) other).value; 47 } 48 49 return false; 50 } 51 52 int classFileSize() { 53 return 1 + 8; 55 } 56 57 void put(ClassFormatOutput out) throws IOException { 58 super.put(out); 59 out.writeLong(value); 60 } 61 } 62 63 | Popular Tags |