KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > compiler > lookup > TagBits


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.lookup;
12
13 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
14
15 public interface TagBits {
16     
17     // Tag bits in the tagBits int of every TypeBinding
18
long IsArrayType = ASTNode.Bit1;
19     long IsBaseType = ASTNode.Bit2;
20     long IsNestedType = ASTNode.Bit3;
21     long IsMemberType = ASTNode.Bit4;
22     long MemberTypeMask = IsNestedType | IsMemberType;
23     long IsLocalType = ASTNode.Bit5;
24     long LocalTypeMask = IsNestedType | IsLocalType;
25     long IsAnonymousType = ASTNode.Bit6;
26     long AnonymousTypeMask = LocalTypeMask | IsAnonymousType;
27     long IsBinaryBinding = ASTNode.Bit7;
28     
29     long HasInconsistentHierarchy = ASTNode.Bit8; // for binary type binding only
30

31     // for the type cycle hierarchy check used by ClassScope
32
long BeginHierarchyCheck = ASTNode.Bit9; // type
33
long EndHierarchyCheck = ASTNode.Bit10; // type
34
long ContainsNestedTypesInSignature = ASTNode.Bit10; // method
35
long HasParameterAnnotations = ASTNode.Bit11; // method
36

37     // test bit to see if default abstract methods were computed
38
long KnowsDefaultAbstractMethods = ASTNode.Bit11; // type
39

40     long IsArgument = ASTNode.Bit11; // local
41
long ClearPrivateModifier = ASTNode.Bit11; // constructor binding
42

43     // test bits to see if parts of binary types are faulted
44
long AreFieldsSorted = ASTNode.Bit13;
45     long AreFieldsComplete = ASTNode.Bit14; // sorted and all resolved
46
long AreMethodsSorted = ASTNode.Bit15;
47     long AreMethodsComplete = ASTNode.Bit16; // sorted and all resolved
48

49     // test bit to avoid asking a type for a member type (includes inherited member types)
50
long HasNoMemberTypes = ASTNode.Bit17;
51
52     // test bit to identify if the type's hierarchy is inconsistent
53
long HierarchyHasProblems = ASTNode.Bit18;
54
55     // test bit to identify if the type's type variables have been connected
56
long TypeVariablesAreConnected = ASTNode.Bit19;
57
58     // set for parameterized type with successfull bound check
59
long PassedBoundCheck = ASTNode.Bit23;
60     
61     // set for parameterized type NOT of the form X<?,?>
62
long IsBoundParameterizedType = ASTNode.Bit24;
63     
64     // used by BinaryTypeBinding
65
long HasUnresolvedTypeVariables = ASTNode.Bit25;
66     long HasUnresolvedSuperclass = ASTNode.Bit26;
67     long HasUnresolvedSuperinterfaces = ASTNode.Bit27;
68     long HasUnresolvedEnclosingType = ASTNode.Bit28;
69     long HasUnresolvedMemberTypes = ASTNode.Bit29;
70
71     long HasTypeVariable = ASTNode.Bit30; // set either for type variables (direct) or parameterized types indirectly referencing type variables
72
long HasDirectWildcard = ASTNode.Bit31; // set for parameterized types directly referencing wildcards
73

74     // for the annotation cycle hierarchy check used by ClassScope
75
long BeginAnnotationCheck = ASTNode.Bit32L;
76     long EndAnnotationCheck = ASTNode.Bit33L;
77     
78     // standard annotations
79
// 9-bits for targets
80
long AnnotationResolved = ASTNode.Bit34L;
81     long DeprecatedAnnotationResolved = ASTNode.Bit35L;
82     long AnnotationTarget = ASTNode.Bit36L; // @Target({}) only sets this bit
83
long AnnotationForType = ASTNode.Bit37L;
84     long AnnotationForField = ASTNode.Bit38L;
85     long AnnotationForMethod = ASTNode.Bit39L;
86     long AnnotationForParameter = ASTNode.Bit40L;
87     long AnnotationForConstructor = ASTNode.Bit41L;
88     long AnnotationForLocalVariable = ASTNode.Bit42L;
89     long AnnotationForAnnotationType = ASTNode.Bit43L;
90     long AnnotationForPackage = ASTNode.Bit44L;
91     long AnnotationTargetMASK = AnnotationTarget
92                 | AnnotationForType | AnnotationForField
93                 | AnnotationForMethod | AnnotationForParameter
94                 | AnnotationForConstructor | AnnotationForLocalVariable
95                 | AnnotationForAnnotationType | AnnotationForPackage;
96     // 2-bits for retention (should check (tagBits & RetentionMask) == RuntimeRetention
97
long AnnotationSourceRetention = ASTNode.Bit45L;
98     long AnnotationClassRetention = ASTNode.Bit46L;
99     long AnnotationRuntimeRetention = AnnotationSourceRetention | AnnotationClassRetention;
100     long AnnotationRetentionMASK = AnnotationSourceRetention | AnnotationClassRetention | AnnotationRuntimeRetention;
101     // marker annotations
102
long AnnotationDeprecated = ASTNode.Bit47L;
103     long AnnotationDocumented = ASTNode.Bit48L;
104     long AnnotationInherited = ASTNode.Bit49L;
105     long AnnotationOverride = ASTNode.Bit50L;
106     long AnnotationSuppressWarnings = ASTNode.Bit51L;
107     long AllStandardAnnotationsMask = AnnotationTargetMASK | AnnotationRetentionMASK | AnnotationDeprecated | AnnotationDocumented | AnnotationInherited | AnnotationOverride | AnnotationSuppressWarnings;
108     
109     long DefaultValueResolved = ASTNode.Bit52L;
110     
111     // set when type contains non-private constructor(s)
112
long HasNonPrivateConstructor = ASTNode.Bit53L;
113 }
114
Popular Tags