aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-03-10 17:23:34 +0000
committeraclement <aclement>2005-03-10 17:23:34 +0000
commit6c05b25f69b1478b1336744ab69b3f2659d4ea68 (patch)
tree1db5032a888e07f0154fc8551303f30e769db6be
parente7d978ecdbe0f257426a824903a434288b83470f (diff)
downloadaspectj-6c05b25f69b1478b1336744ab69b3f2659d4ea68.tar.gz
aspectj-6c05b25f69b1478b1336744ab69b3f2659d4ea68.zip
Declare annotation: slightly modified to allow subtypes to specify whether they want the ajsynthetic attribute attached to the method it represents. (used by DeclareAnnotationDeclaration)
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AjMethodDeclaration.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AjMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AjMethodDeclaration.java
index 92f1fafa3..bb31f5e16 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AjMethodDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AjMethodDeclaration.java
@@ -32,16 +32,23 @@ public class AjMethodDeclaration extends MethodDeclaration {
super(compilationResult);
}
- /* (non-Javadoc)
- * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile)
+ /**
+ * Overridden to add extra AJ stuff, also adds synthetic if boolean is true.
*/
- protected int generateInfoAttributes(ClassFile classFile) {
+ protected int generateInfoAttributes(ClassFile classFile,boolean addAjSynthetic) {
// add extra attributes into list then call 2-arg version of generateInfoAttributes...
List extras = new ArrayList();
addDeclarationStartLineAttribute(extras,classFile);
+ if (addAjSynthetic) {
+ extras.add(new EclipseAttributeAdapter(new AjAttribute.AjSynthetic()));
+ }
return classFile.generateMethodInfoAttribute(binding,false,extras);
}
+ protected int generateInfoAttributes(ClassFile classFile) {
+ return generateInfoAttributes(classFile,false);
+ }
+
protected void addDeclarationStartLineAttribute(List extraAttributeList, ClassFile classFile) {
if (!classFile.codeStream.generateLineNumberAttributes) return;