]> source.dussan.org Git - aspectj.git/commitdiff
258206: package declaration support in the model
authoraclement <aclement>
Tue, 6 Jan 2009 22:05:38 +0000 (22:05 +0000)
committeraclement <aclement>
Tue, 6 Jan 2009 22:05:38 +0000 (22:05 +0000)
asm/src/org/aspectj/asm/IProgramElement.java

index ede81c7202052ac7b5bf440279b50d4afaf0e7b7..18ec291322e34c9940c63c50fbbbc428f708afc0 100644 (file)
@@ -314,12 +314,13 @@ public interface IProgramElement extends Serializable {
                public static final Kind DECLARE_ANNOTATION_AT_METHOD = new Kind("declare @method");
                public static final Kind DECLARE_ANNOTATION_AT_TYPE = new Kind("declare @type");
                public static final Kind SOURCE_FOLDER = new Kind("source folder");
+               public static final Kind PACKAGE_DECLARATION = new Kind("package declaration");
 
                public static final Kind[] ALL = { PROJECT, PACKAGE, FILE, FILE_JAVA, FILE_ASPECTJ, FILE_LST, IMPORT_REFERENCE, CLASS,
                                INTERFACE, ASPECT, ENUM, ENUM_VALUE, ANNOTATION, INITIALIZER, INTER_TYPE_FIELD, INTER_TYPE_METHOD,
                                INTER_TYPE_CONSTRUCTOR, INTER_TYPE_PARENT, CONSTRUCTOR, METHOD, FIELD, POINTCUT, ADVICE, DECLARE_PARENTS,
                                DECLARE_WARNING, DECLARE_ERROR, DECLARE_SOFT, DECLARE_PRECEDENCE, CODE, ERROR, DECLARE_ANNOTATION_AT_CONSTRUCTOR,
-                               DECLARE_ANNOTATION_AT_FIELD, DECLARE_ANNOTATION_AT_METHOD, DECLARE_ANNOTATION_AT_TYPE, SOURCE_FOLDER
+                               DECLARE_ANNOTATION_AT_FIELD, DECLARE_ANNOTATION_AT_METHOD, DECLARE_ANNOTATION_AT_TYPE, SOURCE_FOLDER, PACKAGE_DECLARATION
 
                };
 
@@ -385,5 +386,9 @@ public interface IProgramElement extends Serializable {
                private Object readResolve() throws ObjectStreamException {
                        return ALL[ordinal];
                }
+
+               public boolean isPackageDeclaration() {
+                       return this == PACKAGE_DECLARATION;
+               }
        }
 }
\ No newline at end of file