From 7deaa61cfdd361bfc1b55885c5e6f550244427a2 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 6 Jan 2009 22:05:38 +0000 Subject: [PATCH] 258206: package declaration support in the model --- asm/src/org/aspectj/asm/IProgramElement.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java index ede81c720..18ec29132 100644 --- a/asm/src/org/aspectj/asm/IProgramElement.java +++ b/asm/src/org/aspectj/asm/IProgramElement.java @@ -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 -- 2.39.5