--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.services.classfile.CONSTANT_Integer_info\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.services.classfile;\r
+\r
+import org.apache.derby.iapi.services.classfile.VMDescriptor;\r
+import java.io.IOException;\r
+\r
+/** Integer Constant - page 96 */\r
+class CONSTANT_Integer_info extends ConstantPoolEntry {\r
+ private final int value;\r
+\r
+ CONSTANT_Integer_info(int value) {\r
+ super(VMDescriptor.CONSTANT_Integer);\r
+ this.value = value;\r
+ }\r
+\r
+ public int hashCode() {\r
+ return value;\r
+ }\r
+\r
+ void put(ClassFormatOutput out) throws IOException {\r
+ super.put(out);\r
+ out.putU4(value);\r
+ }\r
+\r
+ public boolean equals(Object other) {\r
+\r
+ // check it is the right type\r
+ if (other instanceof CONSTANT_Integer_info) {\r
+ \r
+ return value == ((CONSTANT_Integer_info) other).value;\r
+ }\r
+\r
+ return false;\r
+ }\r
+\r
+ int classFileSize() {\r
+ // 1 (tag) + 4 (int length)\r
+ return 1 + 4;\r
+ }\r
+}\r
+\r