KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > compiler > classfmt > ClassFileConstants


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.compiler.classfmt;
12
13 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
14
15 public interface ClassFileConstants {
16     
17     int AccDefault = 0;
18     /*
19      * Modifiers
20      */

21     int AccPublic = 0x0001;
22     int AccPrivate = 0x0002;
23     int AccProtected = 0x0004;
24     int AccStatic = 0x0008;
25     int AccFinal = 0x0010;
26     int AccSynchronized = 0x0020;
27     int AccVolatile = 0x0040;
28     int AccBridge = 0x0040;
29     int AccTransient = 0x0080;
30     int AccVarargs = 0x0080;
31     int AccNative = 0x0100;
32     int AccInterface = 0x0200;
33     int AccAbstract = 0x0400;
34     int AccStrictfp = 0x0800;
35     int AccSynthetic = 0x1000;
36     int AccAnnotation = 0x2000;
37     int AccEnum = 0x4000;
38
39     /**
40      * Other VM flags.
41      */

42     int AccSuper = 0x0020;
43
44     /**
45      * Extra flags for types and members attributes.
46      */

47     int AccAnnotationDefault = ASTNode.Bit18; // indicate presence of an attribute "DefaultValue" (annotation method)
48
int AccDeprecated = ASTNode.Bit21; // indicate presence of an attribute "Deprecated"
49

50     int Utf8Tag = 1;
51     int IntegerTag = 3;
52     int FloatTag = 4;
53     int LongTag = 5;
54     int DoubleTag = 6;
55     int ClassTag = 7;
56     int StringTag = 8;
57     int FieldRefTag = 9;
58     int MethodRefTag = 10;
59     int InterfaceMethodRefTag = 11;
60     int NameAndTypeTag = 12;
61     
62     int ConstantMethodRefFixedSize = 5;
63     int ConstantClassFixedSize = 3;
64     int ConstantDoubleFixedSize = 9;
65     int ConstantFieldRefFixedSize = 5;
66     int ConstantFloatFixedSize = 5;
67     int ConstantIntegerFixedSize = 5;
68     int ConstantInterfaceMethodRefFixedSize = 5;
69     int ConstantLongFixedSize = 9;
70     int ConstantStringFixedSize = 3;
71     int ConstantUtf8FixedSize = 3;
72     int ConstantNameAndTypeFixedSize = 5;
73     
74     int MAJOR_VERSION_1_1 = 45;
75     int MAJOR_VERSION_1_2 = 46;
76     int MAJOR_VERSION_1_3 = 47;
77     int MAJOR_VERSION_1_4 = 48;
78     int MAJOR_VERSION_1_5 = 49;
79     int MAJOR_VERSION_1_6 = 50;
80     int MAJOR_VERSION_1_7 = 51;
81     
82     int MINOR_VERSION_0 = 0;
83     int MINOR_VERSION_1 = 1;
84     int MINOR_VERSION_2 = 2;
85     int MINOR_VERSION_3 = 3;
86     
87     // JDK 1.1 -> 1.7, comparable value allowing to check both major/minor version at once 1.4.1 > 1.4.0
88
// 16 unsigned bits for major, then 16 bits for minor
89
long JDK1_1 = ((long)ClassFileConstants.MAJOR_VERSION_1_1 << 16) + ClassFileConstants.MINOR_VERSION_3; // 1.1. is 45.3
90
long JDK1_2 = ((long)ClassFileConstants.MAJOR_VERSION_1_2 << 16) + ClassFileConstants.MINOR_VERSION_0;
91     long JDK1_3 = ((long)ClassFileConstants.MAJOR_VERSION_1_3 << 16) + ClassFileConstants.MINOR_VERSION_0;
92     long JDK1_4 = ((long)ClassFileConstants.MAJOR_VERSION_1_4 << 16) + ClassFileConstants.MINOR_VERSION_0;
93     long JDK1_5 = ((long)ClassFileConstants.MAJOR_VERSION_1_5 << 16) + ClassFileConstants.MINOR_VERSION_0;
94     long JDK1_6 = ((long)ClassFileConstants.MAJOR_VERSION_1_6 << 16) + ClassFileConstants.MINOR_VERSION_0;
95     long JDK1_7 = ((long)ClassFileConstants.MAJOR_VERSION_1_7 << 16) + ClassFileConstants.MINOR_VERSION_0;
96     
97     // jdk level used to denote future releases: optional behavior is not enabled for now, but may become so. In order to enable these,
98
// search for references to this constant, and change it to one of the official JDT constants above.
99
long JDK_DEFERRED = Long.MAX_VALUE;
100     
101     int INT_ARRAY = 10;
102     int BYTE_ARRAY = 8;
103     int BOOLEAN_ARRAY = 4;
104     int SHORT_ARRAY = 9;
105     int CHAR_ARRAY = 5;
106     int LONG_ARRAY = 11;
107     int FLOAT_ARRAY = 6;
108     int DOUBLE_ARRAY = 7;
109     
110     // Debug attributes
111
int ATTR_SOURCE = 1; // SourceFileAttribute
112
int ATTR_LINES = 2; // LineNumberAttribute
113
int ATTR_VARS = 4; // LocalVariableTableAttribute
114
int ATTR_STACK_MAP = 8; // Stack map table attribute
115
}
116
Popular Tags