001: /*******************************************************************************
002: * Copyright (c) 2000, 2007 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.internal.compiler.lookup;
011:
012: import org.eclipse.jdt.internal.compiler.ast.ASTNode;
013:
014: public interface TagBits {
015:
016: // Tag bits in the tagBits int of every TypeBinding
017: long IsArrayType = ASTNode.Bit1;
018: long IsBaseType = ASTNode.Bit2;
019: long IsNestedType = ASTNode.Bit3;
020: long IsMemberType = ASTNode.Bit4;
021: long MemberTypeMask = IsNestedType | IsMemberType;
022: long IsLocalType = ASTNode.Bit5;
023: long LocalTypeMask = IsNestedType | IsLocalType;
024: long IsAnonymousType = ASTNode.Bit6;
025: long AnonymousTypeMask = LocalTypeMask | IsAnonymousType;
026: long IsBinaryBinding = ASTNode.Bit7;
027:
028: long HasInconsistentHierarchy = ASTNode.Bit8; // for binary type binding only
029:
030: // for the type cycle hierarchy check used by ClassScope
031: long BeginHierarchyCheck = ASTNode.Bit9; // type
032: long EndHierarchyCheck = ASTNode.Bit10; // type
033: long ContainsNestedTypesInSignature = ASTNode.Bit10; // method
034: long HasParameterAnnotations = ASTNode.Bit11; // method
035:
036: // test bit to see if default abstract methods were computed
037: long KnowsDefaultAbstractMethods = ASTNode.Bit11; // type
038:
039: long IsArgument = ASTNode.Bit11; // local
040: long ClearPrivateModifier = ASTNode.Bit11; // constructor binding
041:
042: // test bits to see if parts of binary types are faulted
043: long AreFieldsSorted = ASTNode.Bit13;
044: long AreFieldsComplete = ASTNode.Bit14; // sorted and all resolved
045: long AreMethodsSorted = ASTNode.Bit15;
046: long AreMethodsComplete = ASTNode.Bit16; // sorted and all resolved
047:
048: // test bit to avoid asking a type for a member type (includes inherited member types)
049: long HasNoMemberTypes = ASTNode.Bit17;
050:
051: // test bit to identify if the type's hierarchy is inconsistent
052: long HierarchyHasProblems = ASTNode.Bit18;
053:
054: // test bit to identify if the type's type variables have been connected
055: long TypeVariablesAreConnected = ASTNode.Bit19;
056:
057: // set for parameterized type with successfull bound check
058: long PassedBoundCheck = ASTNode.Bit23;
059:
060: // set for parameterized type NOT of the form X<?,?>
061: long IsBoundParameterizedType = ASTNode.Bit24;
062:
063: // used by BinaryTypeBinding
064: long HasUnresolvedTypeVariables = ASTNode.Bit25;
065: long HasUnresolvedSuperclass = ASTNode.Bit26;
066: long HasUnresolvedSuperinterfaces = ASTNode.Bit27;
067: long HasUnresolvedEnclosingType = ASTNode.Bit28;
068: long HasUnresolvedMemberTypes = ASTNode.Bit29;
069:
070: long HasTypeVariable = ASTNode.Bit30; // set either for type variables (direct) or parameterized types indirectly referencing type variables
071: long HasDirectWildcard = ASTNode.Bit31; // set for parameterized types directly referencing wildcards
072:
073: // for the annotation cycle hierarchy check used by ClassScope
074: long BeginAnnotationCheck = ASTNode.Bit32L;
075: long EndAnnotationCheck = ASTNode.Bit33L;
076:
077: // standard annotations
078: // 9-bits for targets
079: long AnnotationResolved = ASTNode.Bit34L;
080: long DeprecatedAnnotationResolved = ASTNode.Bit35L;
081: long AnnotationTarget = ASTNode.Bit36L; // @Target({}) only sets this bit
082: long AnnotationForType = ASTNode.Bit37L;
083: long AnnotationForField = ASTNode.Bit38L;
084: long AnnotationForMethod = ASTNode.Bit39L;
085: long AnnotationForParameter = ASTNode.Bit40L;
086: long AnnotationForConstructor = ASTNode.Bit41L;
087: long AnnotationForLocalVariable = ASTNode.Bit42L;
088: long AnnotationForAnnotationType = ASTNode.Bit43L;
089: long AnnotationForPackage = ASTNode.Bit44L;
090: long AnnotationTargetMASK = AnnotationTarget | AnnotationForType
091: | AnnotationForField | AnnotationForMethod
092: | AnnotationForParameter | AnnotationForConstructor
093: | AnnotationForLocalVariable | AnnotationForAnnotationType
094: | AnnotationForPackage;
095: // 2-bits for retention (should check (tagBits & RetentionMask) == RuntimeRetention
096: long AnnotationSourceRetention = ASTNode.Bit45L;
097: long AnnotationClassRetention = ASTNode.Bit46L;
098: long AnnotationRuntimeRetention = AnnotationSourceRetention
099: | AnnotationClassRetention;
100: long AnnotationRetentionMASK = AnnotationSourceRetention
101: | AnnotationClassRetention | AnnotationRuntimeRetention;
102: // marker annotations
103: long AnnotationDeprecated = ASTNode.Bit47L;
104: long AnnotationDocumented = ASTNode.Bit48L;
105: long AnnotationInherited = ASTNode.Bit49L;
106: long AnnotationOverride = ASTNode.Bit50L;
107: long AnnotationSuppressWarnings = ASTNode.Bit51L;
108: long AllStandardAnnotationsMask = AnnotationTargetMASK
109: | AnnotationRetentionMASK | AnnotationDeprecated
110: | AnnotationDocumented | AnnotationInherited
111: | AnnotationOverride | AnnotationSuppressWarnings;
112:
113: long DefaultValueResolved = ASTNode.Bit52L;
114:
115: // set when type contains non-private constructor(s)
116: long HasNonPrivateConstructor = ASTNode.Bit53L;
117: }
|