1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.classfmt;
13 import org.eclipse.jdt.internal.compiler.env.*;
15 public interface ClassFileConstants extends IConstants {
25 int MethodRefTag = 10;
26 int InterfaceMethodRefTag = 11;
27 int NameAndTypeTag = 12;
29 int ConstantMethodRefFixedSize = 5;
30 int ConstantClassFixedSize = 3;
31 int ConstantDoubleFixedSize = 9;
32 int ConstantFieldRefFixedSize = 5;
33 int ConstantFloatFixedSize = 5;
34 int ConstantIntegerFixedSize = 5;
35 int ConstantInterfaceMethodRefFixedSize = 5;
36 int ConstantLongFixedSize = 9;
37 int ConstantStringFixedSize = 3;
38 int ConstantUtf8FixedSize = 3;
39 int ConstantNameAndTypeFixedSize = 5;
41 int MAJOR_VERSION_1_1 = 45;
42 int MAJOR_VERSION_1_2 = 46;
43 int MAJOR_VERSION_1_3 = 47;
44 int MAJOR_VERSION_1_4 = 48;
45 int MAJOR_VERSION_1_5 = 49;
47 int MINOR_VERSION_0 = 0;
48 int MINOR_VERSION_1 = 1;
49 int MINOR_VERSION_2 = 2;
50 int MINOR_VERSION_3 = 3;
52 // JDK 1.1 -> 1.5, comparable value allowing to check both major/minor version at once 1.4.1 > 1.4.0
53 // 16 unsigned bits for major, then 16 bits for minor
54 long JDK1_1 = ((long)ClassFileConstants.MAJOR_VERSION_1_1 << 16) + ClassFileConstants.MINOR_VERSION_3; // 1.1. is 45.3
55 long JDK1_2 = ((long)ClassFileConstants.MAJOR_VERSION_1_2 << 16) + ClassFileConstants.MINOR_VERSION_0;
56 long JDK1_3 = ((long)ClassFileConstants.MAJOR_VERSION_1_3 << 16) + ClassFileConstants.MINOR_VERSION_0;
57 long JDK1_4 = ((long)ClassFileConstants.MAJOR_VERSION_1_4 << 16) + ClassFileConstants.MINOR_VERSION_0;
58 long JDK1_5 = ((long)ClassFileConstants.MAJOR_VERSION_1_5 << 16) + ClassFileConstants.MINOR_VERSION_0;
60 // jdk level used to denote future releases: optional behavior is not enabled for now, but may become so. In order to enable these,
61 // search for references to this constant, and change it to one of the official JDT constants above.
62 long JDK_DEFERRED = Long.MAX_VALUE;