]> source.dussan.org Git - aspectj.git/commitdiff
72766 - implement isEnum/isAnnotation
authoraclement <aclement>
Thu, 2 Dec 2004 10:33:16 +0000 (10:33 +0000)
committeraclement <aclement>
Thu, 2 Dec 2004 10:33:16 +0000 (10:33 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java

index 25a55ee76bd8aef53b195a23562c08642c3aa2a3..2ee7fefa17052099500378a4e143f7e395109f2a 100644 (file)
@@ -209,6 +209,18 @@ public class EclipseSourceType extends ResolvedTypeX.ConcreteName {
                return binding.isInterface();
        }
 
+       // XXXAJ5: Should be constants in the eclipse compiler somewhere, once it supports 1.5
+       public final static short ACC_ANNOTATION   = 0x2000;
+       public final static short ACC_ENUM         = 0x4000;
+       
+       public boolean isEnum() {
+               return (binding.getAccessFlags() & ACC_ENUM)!=0;
+       }
+       
+       public boolean isAnnotation() {
+               return (binding.getAccessFlags() & ACC_ANNOTATION)!=0;
+       }
+
        public PerClause getPerClause() {
                //should probably be: ((AspectDeclaration)declaration).perClause;
                // but we don't need this level of detail, and working with real per clauses