1 11 package org.eclipse.jdt.internal.compiler.lookup; 12 13 import org.eclipse.jdt.internal.compiler.ast.ASTNode; 14 15 public abstract class Binding { 16 17 public static final int FIELD = ASTNode.Bit1; 19 public static final int LOCAL = ASTNode.Bit2; 20 public static final int VARIABLE = FIELD | LOCAL; 21 public static final int TYPE = ASTNode.Bit3; 22 public static final int METHOD = ASTNode.Bit4; 23 public static final int PACKAGE = ASTNode.Bit5; 24 public static final int IMPORT = ASTNode.Bit6; 25 public static final int ARRAY_TYPE = TYPE | ASTNode.Bit7; 26 public static final int BASE_TYPE = TYPE | ASTNode.Bit8; 27 public static final int PARAMETERIZED_TYPE = TYPE | ASTNode.Bit9; 28 public static final int WILDCARD_TYPE = TYPE | ASTNode.Bit10; 29 public static final int RAW_TYPE = TYPE | ASTNode.Bit11; 30 public static final int GENERIC_TYPE = TYPE | ASTNode.Bit12; 31 public static final int TYPE_PARAMETER = TYPE | ASTNode.Bit13; 32 33 public static final TypeBinding[] NO_TYPES = new TypeBinding[0]; 35 public static final TypeBinding[] NO_PARAMETERS = new TypeBinding[0]; 36 public static final ReferenceBinding[] NO_EXCEPTIONS = new ReferenceBinding[0]; 37 public static final ReferenceBinding[] ANY_EXCEPTION = new ReferenceBinding[] { null }; public static final FieldBinding[] NO_FIELDS = new FieldBinding[0]; 39 public static final MethodBinding[] NO_METHODS = new MethodBinding[0]; 40 public static final ReferenceBinding[] NO_SUPERINTERFACES = new ReferenceBinding[0]; 41 public static final ReferenceBinding[] NO_MEMBER_TYPES = new ReferenceBinding[0]; 42 public static final TypeVariableBinding[] NO_TYPE_VARIABLES = new TypeVariableBinding[0]; 43 public static final AnnotationBinding[] NO_ANNOTATIONS = new AnnotationBinding[0]; 44 public static final ElementValuePair[] NO_ELEMENT_VALUE_PAIRS = new ElementValuePair[0]; 45 46 49 public abstract int kind(); 50 54 public char[] computeUniqueKey() { 55 return computeUniqueKey(true); 56 } 57 61 public char[] computeUniqueKey(boolean isLeaf) { 62 return null; 63 } 64 65 70 public long getAnnotationTagBits() { 71 return 0; 72 } 73 74 79 public void initializeDeprecatedAnnotationTagBits() { 80 } 82 83 86 public final boolean isValidBinding() { 87 return problemId() == ProblemReasons.NoError; 88 } 89 93 public int problemId() { 95 return ProblemReasons.NoError; 96 } 97 99 public abstract char[] readableName(); 100 102 public char[] shortReadableName(){ 103 return readableName(); 104 } 105 } 106 | Popular Tags |