1 7 8 package javax.lang.model.element; 9 10 24 public enum ElementKind { 25 26 27 PACKAGE, 28 29 31 ENUM, 32 33 CLASS, 34 35 ANNOTATION_TYPE, 36 40 INTERFACE, 41 42 44 ENUM_CONSTANT, 45 49 FIELD, 50 51 PARAMETER, 52 53 LOCAL_VARIABLE, 54 55 EXCEPTION_PARAMETER, 56 57 59 METHOD, 60 61 CONSTRUCTOR, 62 63 STATIC_INIT, 64 65 INSTANCE_INIT, 66 67 68 TYPE_PARAMETER, 69 70 74 OTHER; 75 76 77 83 public boolean isClass() { 84 return this == CLASS || this == ENUM; 85 } 86 87 93 public boolean isInterface() { 94 return this == INTERFACE || this == ANNOTATION_TYPE; 95 } 96 97 103 public boolean isField() { 104 return this == FIELD || this == ENUM_CONSTANT; 105 } 106 } 107 | Popular Tags |